AEDisposeToken
You can use the AEDisposeToken function to deallocate the memory used by a token.
FUNCTION AEDisposeToken (VAR theToken: AEDesc): OSErr;
theToken
- The token to be disposed of.
DESCRIPTION
When your application calls the AEDisposeToken function, the Apple Event Manager first calls your application's token disposal function, if you have provided one. If you haven't provided a token disposal function, or if your application's token disposal function returns errAEEventNotHandled as the function result, the Apple Event Manager calls the system token disposal function if one is available. If there is no system token disposal function or the function returns errAEEventNotHandled as the function result, the Apple Event Manager calls the AEDisposeDesc function to dispose of the token.
RESULT CODES
In addition to the following result codes, AEDisposeToken also returns result codes returned by the token disposal function that disposed of the token.
| noErr | 0 | No error occurred |
| paramErr | -50 | AEObjectInit was not called before this function was called |
| notASpecialFunction | -1714 | The keyword is not valid for a special function |
SEE ALSO
For information about writing a token disposal function, see page 6-111.