CFType

Overview

All other Core Foundation opaque types derive from CFType. The functions, callbacks, data types, and constants defined for CFType can be used by any derived opaque type. Hence, CFType functions are referred to as “polymorphic functions.” You use CFType functions to retain and release objects, to compare and inspect objects, get descriptions of objects and opaque types, and to get object allocators.

Topics

Memory Management

CFGetAllocator

Returns the allocator used to allocate a Core Foundation object.

CFGetRetainCount

Returns the reference count of 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.

Determining Equality

CFEqual

Determines whether two Core Foundation objects are considered equal.

Hashing

CFHash

Returns a code that can be used to identify an object in a hashing structure.

Miscellaneous Functions

CFCopyDescription

Returns a textual description of a Core Foundation object.

CFCopyTypeIDDescription

Returns a textual description of a Core Foundation type, as identified by its type ID, which can be used when debugging.

CFGetTypeID

Returns the unique identifier of an opaque type to which a Core Foundation object belongs.

CFShow

Prints a description of a Core Foundation object to stderr.

Data Types

CFHashCode

A type for hash codes returned by the CFHash function.

CFTypeID

A type for unique, constant integer values that identify particular Core Foundation opaque types.

CFTypeRef

An untyped "generic" reference to any Core Foundation object.

See Also

Opaque Types

CFFileDescriptor

The CFFileDescriptor provides an opaque type to monitor file descriptors for read and write activity via CFRunLoop.

CFStringTokenizer

CFStringTokenizer allows you to tokenize strings into words, sentences or paragraphs in a language-neutral way. It supports languages such as Japanese and Chinese that do not delimit words by spaces, as well as de-compounding German compounds. You can obtain Latin transcription for tokens. It also provides language identification API.