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: Interapplication Communication /
Chapter 10 - Scripting Components / Scripting Components Reference
Required Scripting Component Routines / Executing and Disposing of Scripts


OSADispose

You can use the OSADispose function 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 OpenDefaultComponent or OpenComponent (see page 10-4).
scriptID
The script ID for the script data to be disposed of.
DESCRIPTION
The OSADispose function releases the memory assigned to the script data identified by the scriptID parameter. The script ID passed to the OSADispose function 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 OSADispose returns noErr if the script ID is kOSANullScript, although it does not dispose of anything.

RESULT CODES
noErr0No error
errOSASystemError-1750General scripting system error
errOSAInvalidID-1751Invalid script ID
badComponentInstance$80008001Invalid component instance

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996