CFAllocator
Declaration
class CFAllocatorOverview
CFAllocator is an opaque type that allocates and deallocates memory for you. You never have to allocate, reallocate, or deallocate memory directly for Core Foundation objects—and rarely should you. You pass CFAllocator objects into functions that create objects; these functions have “Create” embedded in their names, for example, CFStringCreateWithPascalString. The creation functions use the allocators to allocate memory for the objects they create.
Topics
Creating an Allocator
Managing Memory with an Allocator
CFAllocatorAllocate(_:_:_:)CFAllocatorDeallocate(_:_:)CFAllocatorGetPreferredSizeForSize(_:_:_:)CFAllocatorReallocate(_:_:_:_:)
Getting and Setting the Default Allocator
Getting an Allocator’s Context
Getting the CFAllocator Type ID
Callbacks
CFAllocatorAllocateCallBackCFAllocatorCopyDescriptionCallBackCFAllocatorDeallocateCallBackCFAllocatorPreferredSizeCallBackCFAllocatorReallocateCallBackCFAllocatorReleaseCallBackCFAllocatorRetainCallBack
Data Types
Constants
See Also
Related Documentation
- Memory Management Programming Guide for Core Foundation