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: Macintosh Toolbox Essentials /
Chapter 6 - Dialog Manager / Dialog Manager Reference
Dialog Manager Routines / Creating and Disposing of Dialog Boxes


DisposeDialog

To dismiss a dialog box for which the Dialog Manager supplies memory, use the DisposeDialog procedure. The DisposeDialog procedure is also available
as the DisposDialog procedure.

PROCEDURE DisposeDialog (theDialog: DialogPtr);
theDialog
A pointer to a dialog record.
DESCRIPTION
The DisposeDialog procedure calls the CloseDialog procedure and, in addition, releases the memory occupied by the dialog box's item list resource and the dialog record. Call DisposeDialog when you're done with a dialog box if you pass NIL in
the dStorage parameter to GetNewDialog, NewColorDialog, or NewDialog.

Generally, your application should not allocate memory for the dialog records of modal dialog boxes or movable modal dialog boxes. In these cases your application should use DisposeDialog when the user clicks the OK or Cancel button.

SEE ALSO
If you allocate memory for the dialog box (for example, by passing a pointer in the dStorage parameter to the GetNewDialog, NewColorDialog, or NewDialog function), use CloseDialog, described on page 6-112, instead of DisposeDialog.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996