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.

Symbols

Memory Management

func CFGet​Allocator(CFType​Ref!)

Returns the allocator used to allocate a Core Foundation object.

func CFGet​Retain​Count(CFType​Ref!)

Returns the reference count of a Core Foundation object.

Determining Equality

func CFEqual(CFType​Ref!, CFType​Ref!)

Determines whether two Core Foundation objects are considered equal.

Hashing

func CFHash(CFType​Ref!)

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

Miscellaneous Functions

func CFCopy​Description(CFType​Ref!)

Returns a textual description of a Core Foundation object.

func CFCopy​Type​IDDescription(CFType​ID)

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

func CFGet​Type​ID(CFType​Ref!)

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

func CFShow(CFType​Ref!)

Prints a description of a Core Foundation object to stderr.

Data Types

CFHash​Code

A type for hash codes returned by the CFHash function.

CFType​ID

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

CFType​Ref

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