Important: The information in this document is obsolete and should not be used for new development.
OSADispose
You can use theOSADisposefunction to reclaim the memory occupied by script data.
FUNCTION OSADispose(scriptingComponent: ComponentInstance; scriptID: OSAID): OSAError;
scriptingComponent- A component instance created by a prior call to the Component Manager function
OpenDefaultComponentorOpenComponent(see page 10-4).scriptID- The script ID for the script data to be disposed of.
DESCRIPTION
TheOSADisposefunction releases the memory assigned to the script data identified by thescriptIDparameter. The script ID passed to theOSADisposefunction is no longer valid if the function returns successfully. A scripting component can then reuse that script ID for other script data.A call to
OSADisposereturnsnoErrif the script ID iskOSANullScript, although it does not dispose of anything.RESULT CODES
noErr 0 No error errOSASystemError -1750 General scripting system error errOSAInvalidID -1751 Invalid script ID badComponentInstance $80008001 Invalid component instance