Important: The information in this document is obsolete and should not be used for new development.
KillPicture
To release the memory occupied by a picture not stored in a'PICT'resource, use theKillPictureprocedure.
PROCEDURE KillPicture (myPicture:\xDDPicHandle);
myPicture- A handle to the picture whose memory can be released.
DESCRIPTION
TheKillPictureprocedure releases the memory occupied by the picture whose handle you pass in themyPictureparameter. Use this only when you're completely finished with a picture.SPECIAL CONSIDERATIONS
If you use the Window Manager procedureSetWindowPicto store a picture handle in the window record, you can use the Window Manager procedureDisposeWindoworCloseWindowto release the memory allocated to the picture; these procedures automatically callKillPicturefor the picture.If the picture is stored in a
'PICT'resource, you must use the Resource Manager procedureReleaseResourceinstead ofKillPicture. The Window Manager proceduresDisposeWindowandCloseWindowwill not delete it; instead, you must callReleaseResourcebefore callingDisposeWindoworCloseWindow.The
KillPictureprocedure may move or purge memory.SEE ALSO
TheReleaseResourceprocedure is described in the chapter "Resource Manager" in Inside Macintosh: Macintosh Toolbox, and theSetWindowPic,DisposeWindow, andCloseWindowprocedures are described in the chapter "Window Manager," in Inside Macintosh: Macintosh Toolbox Essentials.