CloseDialog
CloseDialog Close dialog window and free some related data
#include <Dialogs.h> Dialog Manager
void CloseDialog( theDialog );
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
itself or the item list. See DisposDialog.
theDialog is the address of a 170-byte DialogRecord (however, the DialogPtr
data type is actually a WindowPtr a.k.a. cGrafPtr or GrafPtr). It
identifies the dialog to destroy.
Returns: none

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
being an address (see NewDialog or GetNewDialog). Use DisposDialog
to discard dialogs that have been allocated for you (i.e., dStorage was NIL
when created).