Increments the reference count (the retain count) of a dispatch object.


void dispatch_retain(dispatch_object_t object);



The object to retain. This parameter cannot be NULL.


Calls to this function must be balanced with calls to dispatch_release. If multiple subsystems of your application share a dispatch object, each subsystem should call dispatch_retain to register its interest in the object. The object is deallocated only when all subsystems have released their interest in the dispatch source.

Note that your application does not need to retain or release the global (main and concurrent) dispatch queues.

See Also

Managing Memory


Decrements the reference count (the retain count) of a dispatch object.


Sets the finalizer function for a dispatch 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