Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8102404

Private controls Weak* classes should clean up in more situations

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u6, 8
    • javafx

      As an extension of RT-24098, we should change the WeakListChangeListener and WeakInvalidationListener to clean up in more situations than just when an event is fired. This can be achieved by using a ReferenceQueue to track if the referent is nulled out, at which point we can remove the listener from the object. This saves us from having potentially thousands of listeners with null referents (because an event hasn't fired to clean up). This may not be a common real-world scenario, but it should have an impact on the performance tests.

            jgiles Jonathan Giles
            jgiles Jonathan Giles
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: