CFAllocatorDeallocate

Header: CFBase.h Carbon status: Supported

Deallocates a block of memory with a given allocator.

void CFAllocatorDeallocate (
    CFAllocatorRef allocator, 
    void *ptr
);
Parameter descriptions
allocator

A reference of type CFAllocatorRef. Pass the reference to the allocator which was used to allocate the block of memory pointed to by ptr.

ptr

An untyped pointer to a block of memory that you want to be deallocated using the specified allocator.

DISCUSSION

You call the CFAllocatorDeallocate function to deallocate a block of memory. The allocator referenced in the first parameter is used for this purpose or, if NULL is passed instead, the default allocator is used. The allocator must be the same allocator that was used to allocate the block of memory. If the allocator does not specify a deallocate callback function, the memory is not deallocated.

SPECIAL CONSIDERATIONS

You must use the same allocator to deallocate memory as was used to allocate it.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


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