Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 7 - Pictures / Pictures Reference
QuickDraw and Picture Utilities Routines / Creating and Disposing of Pictures


KillPicture

To release the memory occupied by a picture not stored in a 'PICT' resource, use the KillPicture procedure.

PROCEDURE KillPicture (myPicture:\xDDPicHandle);
myPicture
A handle to the picture whose memory can be released.
DESCRIPTION
The KillPicture procedure releases the memory occupied by the picture whose handle you pass in the myPicture parameter. Use this only when you're completely finished with a picture.

SPECIAL CONSIDERATIONS
If you use the Window Manager procedure SetWindowPic to store a picture handle in the window record, you can use the Window Manager procedure DisposeWindow or CloseWindow to release the memory allocated to the picture; these procedures automatically call KillPicture for the picture.

If the picture is stored in a 'PICT' resource, you must use the Resource Manager procedure ReleaseResource instead of KillPicture. The Window Manager procedures DisposeWindow and CloseWindow will not delete it; instead, you must call ReleaseResource before calling DisposeWindow or CloseWindow.

The KillPicture procedure may move or purge memory.

SEE ALSO
The ReleaseResource procedure is described in the chapter "Resource Manager" in Inside Macintosh: Macintosh Toolbox, and the SetWindowPic, DisposeWindow, and CloseWindow procedures are described in the chapter "Window Manager," in Inside Macintosh: Macintosh Toolbox Essentials.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996