Important: The information in this document is obsolete and should not be used for new development.
DisposeWindow
Use theDisposeWindowprocedure 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
TheDisposeWindowprocedure 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. (DisposeWindowcallsCloseWindowand 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
DisposeWindowprocedure assumes that any picture pointed to by the window record fieldwindowPicis data, not a resource, and it calls the QuickDraw procedureKillPictureto delete it. If your application uses a picture stored as a resource, you must release the memory it occupies with theReleaseResourceprocedure and set thewindowPicfield toNILbefore closing the window.![]()