WeakishReferencepublic class WeakishReference extends Object These classes are part of some code to reduce memory leaks by only
retaining weak references to things
on Java1.2+, and yet still work (with leaky hard references) on Java1.1.
Now that Ant is 1.2+ only,
life is simpler and none of the classes are needed any more.
They are only retained in case a third-party task uses them |
Fields Summary |
---|
private WeakReference | weakref |
Constructors Summary |
---|
WeakishReference(Object reference)create a new soft reference, which is bound to a
Weak reference inside
this.weakref = new WeakReference(reference);
|
Methods Summary |
---|
public static org.apache.tools.ant.util.WeakishReference | createReference(java.lang.Object object)create the appropriate type of reference for the java version
return new WeakishReference(object);
| public java.lang.Object | get()Returns this reference object's referent. If this reference object has
been cleared, then this method returns null .
return weakref.get();
|
|