org.fusesource.hawtdispatch
Interface Retained

All Known Implementing Classes:
BaseRetained

public interface Retained

Implemented by dispatch objects which use a reference counted life cycle.

Dispatch objects start with a retained count of one. Retaining the object increments the retain counter, releasing, decrements the counter. When the counter reaches zero, the object should not longer be accessed as it will release any resources it needs to perform normal processing.

Author:
Hiram Chirino

Method Summary
 void release()
           Decrement the reference count of this object.
 void retain()
           Increment the reference count of this object.
 int retained()
           
 

Method Detail

retain

void retain()

Increment the reference count of this object.

Calls to retain() must be balanced with calls to release().


release

void release()

Decrement the reference count of this object.

An object is asynchronously disposed once all references are released. Using a disposed object will cause undefined errors. The system does not guarantee that a given client is the last or only reference to a given object.


retained

int retained()
Returns:
the retained counter


Copyright © 2010-2012 FuseSource, Corp.. All Rights Reserved.