release(int)
Releases a reference to an object, freeing it immediately if the reference count drops below the specified threshold.
Declaration
virtual void release(
intfreeWhen) const;Parameters
- freeWhen:
If decrementing the reference count makes it >=
freeWhen, the object is immediately freed.
Overview
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.