public class SoftReference<T> extends Reference<T>
Constructor and Description |
---|
SoftReference(T referent)
Create a new soft reference, that is not registered to any queue.
|
SoftReference(T referent,
ReferenceQueue<? super T> q)
Create a new soft reference.
|
public SoftReference(T referent)
referent
- the object we refer to.public SoftReference(T referent, ReferenceQueue<? super T> q)
referent
- the object we refer to.q
- the reference queue to register on.NullPointerException
- if q is null.