Important: The information in this document is obsolete and should not be used for new development.
DisposeWindow
Use theDisposeWindow
procedure to remove a window if you let the Window Manager allocate memory for the window record.
PROCEDURE DisposeWindow (theWindow: WindowPtr);
- theWindow
- A pointer to the window record of the window to be closed.
DESCRIPTION
TheDisposeWindow
procedure removes a window from the screen, deletes it from the window list, and releases the memory occupied by all structures associated with the window, including the window record. (DisposeWindow
callsCloseWindow
and then releases the memory occupied by the window record.)
Any pending update events for the window are discarded. If the window being removed is the frontmost window, the window behind it, if any, becomes the active window.
- WARNING
- If your application allocated any other memory for use with a window, you must release it before calling
DisposeWindow
. The Window Manager releases only the data structures it created.- The
DisposeWindow
procedure assumes that any picture pointed to by the window record fieldwindowPic
is data, not a resource, and it calls the QuickDraw procedureKillPicture
to delete it. If your application uses a picture stored as a resource, you must release the memory it occupies with theReleaseResource
procedure and set thewindowPic
field toNIL
before closing the window.