![]() |
DisposeRoutineDescriptor |
||||
Header: | MixedMode.h | Carbon status: | Unsupported | |
Disposes of a routine descriptor.
void DisposeRoutineDescriptor ( UniversalProcPtr theProcPtr );
A universal procedure pointer.
The DisposeRoutineDescriptor function disposes of the routine descriptor pointed to by the theProcPtr parameter. You should call this function to release any memory allocated by a previous call to NewRoutineDescriptor.
The Operating System automatically disposes of any remaining routine descriptors held by your application when ExitToShell is executed on its behalf. As a result, you do not need to explicitly dispose of any routine descriptors that you have allocated in your application heap.
In general, you need to create routine descriptors only for routines whose addresses are exported to the system software (for example, a completion procedure). You do not need to create a routine descriptor for a routine that is called by code of the same type.
In general, you need to call this function only from PowerPC code. To maintain a single source code base for your software, however, you can call this function from 680x0 code, as long as you set the USESROUTINEDESCRIPTORS compiler flag to false (its default setting). To compile code for the PowerPC environment, you should set the USESROUTINEDESCRIPTORS flag to true.
Be careful not to dispose of a routine descriptor that is still in use by the Operating System. Code that installs completion routines or other routines called asynchronously may complete before the completion routine is actually called.
When the USESROUTINEDESCRIPTORS compile flag is false, the DisposeRoutineDescriptor function does nothing.
Not supported in Carbon. Not available in CarbonLib, but available when InterfaceLib 7.1 or later is installed. Exported by InterfaceLib 7.1 and later.
Use a specific UPP disposal routine; e.g., use Dispose ControlDefinitionProc instead of the more general function DisposeRoutineDescriptor.
© 2000 Apple Computer, Inc. (Last Updated 4/14/2000)