Contents

taggedRelease(const void *, const int)

Releases a tagged reference to an object, freeing it immediately if the reference count drops below the specified threshold.

Declaration

virtual void taggedRelease(
 const void *tag,
 const intfreeWhen) const;

Parameters

  • tag:

    Used for tracking collection references.

  • freeWhen:

    If decrementing the reference count makes it >= freeWhen, the object is immediately freed.

Overview

Kernel extensions should not use this function. It is for use by OSCollection and subclasses to track inclusion in collections.

If the receiver has freeWhen or fewer references after its reference count is decremented, it is immediately freed.

This version of release can be used to break certain retain cycles in object graphs. In general, however, it should be avoided.

See Also

Miscellaneous