Class WeakReferenceQueue<E>

java.lang.Object
com.sun.javafx.util.WeakReferenceQueue<E>

public class WeakReferenceQueue<E> extends Object
This is a helper class for handling weak references across all devices. We tried to use WeakHashMap, but it isn't available on mobile. We tried to add it to mobile, but it requires ReferenceQueue and it appears that ReferenceQueue requires support from the VM which we don't know that we have on mobile. So this class attempts to lesson the likelyhood of memory leaks. As we abandoned mobile, we considered removal of this class. But replacement by WeakHashMap is not always possible as we use mutable elements. At least it was now possible to optimize this class using the ReferenceQueue.
  • Constructor Details

    • WeakReferenceQueue

      public WeakReferenceQueue()
  • Method Details

    • add

      public void add(E obj)
    • remove

      public void remove(E obj)
    • cleanup

      public void cleanup()
    • iterator

      public Iterator<? super E> iterator()