Function

CFGetRetainCount

Returns the reference count of a Core Foundation object.

Declaration

CFIndex CFGetRetainCount(CFTypeRef cf);

Parameters

cf

The CFType object to examine.

Return Value

A number representing the reference count of cf.

Discussion

You increment the reference count using the CFRetain function, and decrement the reference count using the CFRelease function.

This function may be useful for debugging memory leaks. You normally do not use this function, otherwise.

See Also

Memory Management

CFGetAllocator

Returns the allocator used to allocate a Core Foundation object.

CFMakeCollectable

Makes a newly-allocated Core Foundation object eligible for garbage collection.

CFRelease

Releases a Core Foundation object.

CFRetain

Retains a Core Foundation object.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software