Function

AEDisposeDesc

Deallocates the memory used by a descriptor.

Declaration

OSErr AEDisposeDesc(AEDesc *theAEDesc);

Parameters

theAEDesc

A pointer to the descriptor to deallocate. On return, a null descriptor. If you pass a null descriptor in this parameter, AEDisposeDesc returns noErr. See AEDesc.

Return Value

A result code. See Result Codes. As currently implemented, AEDisposeDesc always returns noErr.

Discussion

The AEDisposeDesc function deallocates the memory used by a descriptor. After calling this method, the descriptor becomes an empty descriptor with a type of typeNULL. Because all Apple event structures (except for keyword-specified descriptors) are descriptors, you can use AEDisposeDesc for any of them.

Do not call AEDisposeDesc on a descriptor obtained from another Apple Event Manager function (such as the reply event from a call to AESend) unless that function returns successfully.

Special Considerations

If the AEDesc might contain an OSL token, dispose of it with AEDisposeToken.

Version-Notes

Thread safe starting in OS X v10.2.