We can do a better fix for 8297638. Alan suggested:
"One approach to try is replacing listeners with a WeakHashMap (with a value of type Boolean, unused) so that additions will automatically expunge stale refs. That should help removeListener implementations too, as they are currently O(n)."
"One approach to try is replacing listeners with a WeakHashMap (with a value of type Boolean, unused) so that additions will automatically expunge stale refs. That should help removeListener implementations too, as they are currently O(n)."
- relates to
-
JDK-8297638 Memory leak in case of many started-dead threads
- Resolved