CloseDialog
CloseDialog
Close dialog window and free some related data DialogPtr theDialog ; pointer to dialog window to close CloseDialog closes the dialog's window and removes it from the screen (see CloseWindow). It frees up the memory occupied by most types of items in the item list and related data structures. It does not release the DialogRecord identifies the dialog to destroy.
Notes: The dialog window is removed from the screen and update events are
generated for any windows it overlapped. If it was the frontmost window,
the next window in the window list gets an activate event.
Storage for the window's regions, and item handles such as control records
and text handles, are released. Handles leading to icons and pictures are NOT
released. Most importantly, the DialogRecord and the item list storage are not released.
CloseDialog is normally used to destroy dialogs created with dStorage to discard dialogs that have been allocated for you (i.e., dStorage was NIL
when created).