Class ListenableWeakReference<T>

  • Type Parameters:
    T - The weak reference
    Direct Known Subclasses:
    AbstractProperty.WeakPreferenceAdapter

    public class ListenableWeakReference<T>
    extends java.lang.ref.WeakReference<T>
    This is a special weak reference that notifies a listener when it is no longer available. A special dereferenced-thread is used for this, so make sure your code is thread-safe.
    Since:
    12181
    • Field Detail

      • GLOBAL_QUEUE

        private static final java.lang.ref.ReferenceQueue<java.lang.Object> GLOBAL_QUEUE
      • thread

        private static java.lang.Thread thread
    • Method Detail

      • onDereference

        protected void onDereference()
        This method is called after the object is dereferenced.
      • clean

        private static void clean()