Project Wonder 2.0

er.extensions
Class ERXRetainer

java.lang.Object
  extended byer.extensions.ERXRetainer

public class ERXRetainer
extends Object

Used as a generic way to retain a reference to an object so that it will not be collected by the garbage collector. This class is most often used to retain objects used to observe {link @NSNotification}s.

Note that the current implementation does not implement reference counting so calling retain multiple times on the same object does not have any effect after the first call.


Constructor Summary
ERXRetainer()
           
 
Method Summary
static boolean isObjectRetained(Object object)
          Tests if the given object is being retained by the ERXRetainer class.
static void release(Object object)
          Releases the reference to the object.
static void retain(Object object)
          Retains a reference to the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXRetainer

public ERXRetainer()
Method Detail

retain

public static void retain(Object object)
Retains a reference to the object.

Parameters:
object - object to be retained.

release

public static void release(Object object)
Releases the reference to the object.

Parameters:
object - object to be released.

isObjectRetained

public static boolean isObjectRetained(Object object)
Tests if the given object is being retained by the ERXRetainer class.

Parameters:
object - object to be tested.
Returns:
returns if the given object is currently retained.

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.