-
Enhancement
-
Resolution: Fixed
-
P4
-
7u6, 8
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.