Carbon


DisposeHandle

Header: MacMemory.h Carbon status: Supported

Releases memory occupied by a relocatable block.

void DisposeHandle (
    Handle h
);
h

A handle to a relocatable block.

DISCUSSION

The DisposeHandle function releases the memory occupied by the relocatable block whose handle is h. It also frees the handle’s master pointer for other uses.

Do not use DisposeHandle to dispose of a handle obtained from the Resource Manager (for example, by a previous call to GetResource), use ReleaseResource instead. If, however, you have called DetachResource on a resource handle, you should dispose of the storage by calling DisposeHandle.

Call the function MemError to get the result code. See “Result Codes”.

Because DisposeHandle purges memory, you should not call it at interrupt time.

After a call to DisposeHandle, all handles to the released block become invalid and should not be used again. Any subsequent calls to DisposeHandle using an invalid handle might damage the master pointer list.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)