Class WeakReference<T,​A>

  • Type Parameters:
    T - the reference value type
    A - the attachment type
    All Implemented Interfaces:
    Reference<T,​A>

    public class WeakReference<T,​A>
    extends WeakReference<T>
    implements Reference<T,​A>
    A reapable weak reference with an attachment. If a Reaper is given, then it will be used to asynchronously clean up the referent.
    Author:
    David M. Lloyd
    See Also:
    WeakReference
    • Constructor Detail

      • WeakReference

        public WeakReference​(T referent)
      • WeakReference

        public WeakReference​(T referent,
                             A attachment)
      • WeakReference

        public WeakReference​(T referent,
                             A attachment,
                             ReferenceQueue<? super T> q)
      • WeakReference

        public WeakReference​(T referent,
                             A attachment,
                             Reaper<T,​A> reaper)