Important: The information in this document is obsolete and should not be used for new development.
DisposeIconSuite
You can use theDisposeIconSuitefunction 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
TheDisposeIconSuitefunction releases the memory occupied by the specified icon suite. However,DisposeIconSuitedoes 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 usingGetIconSuiteorAddIconToSuite. For handles to icon data that your application added to the icon suite usingAddIconToSuite(for example, if your application read in an icon resource, detached it, then added the handle to the suite), you can request thatAddIconToSuiterelease the memory associated with the handles.Set
disposeDatatoTRUEto automatically release icon data that is associated with the specified icon suite but not explicitly associated with a resource fork. If you setdisposeDatatoFALSE,DisposeIconSuitedoes not dispose of any icon data that is associated with the specified icon suite.RESULT CODES
noErr 0 No error memWZErr -111 Attempt to operate on a free block SEE ALSO
For more information on icon suites, see "Creating an Icon Suite" beginning on page 5-30.