Type Alias

CFAllocatorDeallocateCallBack

A prototype for a function callback that deallocates a block of memory.

Declaration

typedef void (*CFAllocatorDeallocateCallBack)(void *ptr, void *info);

Parameters

ptr

The block of memory to deallocate.

info

An untyped pointer to program-defined data.

Discussion

A prototype for a function callback that deallocates a given block of memory. In implementing this function, make the block of memory pointed to by ptr available for subsequent reuse by the allocator but unavailable for continued use by the program. The ptr parameter cannot be NULL and if the ptr parameter is not a block of memory that has been previously allocated by the allocator, the results are undefined; abnormal program termination can occur.

See Also

Callbacks

CFAllocatorAllocateCallBack

A prototype for a function callback that allocates memory of a requested size.

CFAllocatorCopyDescriptionCallBack

A prototype for a function callback that provides a description of the specified data.

CFAllocatorPreferredSizeCallBack

A prototype for a function callback that gives the size of memory likely to be allocated, given a certain request.

CFAllocatorReallocateCallBack

A prototype for a function callback that reallocates memory of a requested size for an existing block of memory.

CFAllocatorReleaseCallBack

A prototype for a function callback that releases the given data.

CFAllocatorRetainCallBack

A prototype for a function callback that retains the given data.