Function

CFAllocatorDeallocate

Deallocates a block of memory with a given allocator.

Declaration

void CFAllocatorDeallocate(CFAllocatorRef allocator, void *ptr);

Parameters

allocator

The allocator that was used to allocate the block of memory pointed to by ptr.

ptr

An untyped pointer to a block of memory to deallocate using allocator.

Discussion

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.

See Also

Managing Memory with an Allocator

CFAllocatorAllocate

Allocates memory using the specified allocator.

CFAllocatorGetPreferredSizeForSize

Obtains the number of bytes likely to be allocated upon a specific request.

CFAllocatorReallocate

Reallocates memory using the specified allocator.