This class refers to an object in a way
that does not prevent that referent object from being finalized and
reclaimed by the garbage collector. When the garbage collector
determines that there are no more hard (direct) references to the
object, and that there are no SoftReference
objects that refer to the object, it clears the
WeakReference and marks the referent object for
finalization. At some point after this, it also enqueues the
WeakReference on its associated
ReferenceQueue, if there is one, in order to
provide notification that the referent has been reclaimed.
WeakReference is used by
java.util.WeakHashMap
to implement a hashtable that does not
prevent the hashtable key object from being garbage-collected.
WeakHashMap is useful when you want to associate
auxiliary information with an object but do not want to prevent the
object from being reclaimed.

public class WeakReference<T> extends Reference<T> {
// Public Constructors
public WeakReference(T referent);
public WeakReference(T referent, ReferenceQueue<? super T> q);
}