Contents

CFAllocator

Declaration

class CFAllocator

Overview

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

Getting and Setting the Default Allocator

Getting an Allocator’s Context

Getting the CFAllocator Type ID

Callbacks

Data Types

Constants

See Also

Related Documentation

  • Memory Management Programming Guide for Core Foundation

Opaque Types