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: More Macintosh Toolbox /
Chapter 5 - Icon Utilities / Icon Utilities Reference
Icon Utilities Routines / Disposing of Icon Suites


DisposeIconSuite

You can use the DisposeIconSuite function to release the memory occupied by an icon suite.

FUNCTION DisposeIconSuite (theIconSuite: Handle; 
                           disposeData: Boolean): OSErr;
theIconSuite
A handle to the icon suite to be disposed of.
disposeData
A Boolean value indicating whether or not to dispose of handles in the icon suite that are not associated with a resource fork.
DESCRIPTION
The DisposeIconSuite function releases the memory occupied by the specified icon suite. However, DisposeIconSuite does not release the memory of any icons explicitly associated with an open resource fork, that is, any handles to icon resource data that your application added to the suite using GetIconSuite or AddIconToSuite. For handles to icon data that your application added to the icon suite using AddIconToSuite (for example, if your application read in an icon resource, detached it, then added the handle to the suite), you can request that AddIconToSuite release the memory associated with the handles.

Set disposeData to TRUE to automatically release icon data that is associated with the specified icon suite but not explicitly associated with a resource fork. If you set disposeData to FALSE, DisposeIconSuite does not dispose of any icon data that is associated with the specified icon suite.

RESULT CODES
noErr0No error
memWZErr-111Attempt to operate on a free block
SEE ALSO
For more information on icon suites, see "Creating an Icon Suite" beginning on page 5-30.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996