Function

CFAllocatorGetDefault

Gets the default allocator object for the current thread.

Declaration

CFAllocatorRef CFAllocatorGetDefault(void);

Return Value

A reference to the default allocator for the current thread. If none has been explicitly set, returns the generic system allocator, kCFAllocatorSystemDefault. Ownership follows The Get Rule.

Discussion

See the discussion for CFAllocatorSetDefault for more detail on the default allocator and for advice on how and when to set a custom allocator as the default.

See Also

Getting and Setting the Default Allocator

CFAllocatorSetDefault

Sets the given allocator as the default for the current thread.