On Wed, 18 Jan 2023 20:06:33 GMT, Chris Plummer <[email protected]> wrote:

> Fix JDI leak when the debuggee creates a lot of threads, while at the same 
> the debugger is not sending any commands. The lack of commands being sent 
> results in code not being triggered that normally would clear out unreachable 
> listeners and also clear out ObjectReferences queued for disposal.

Maybe you've tried this already but if listeners were changed to be a 
WeakHashMap<VMListener, Boolean> then this would expunge the stable entries. 
This would also avoid the O(n) search in removeUnreachableListeners and 
simplify many other operations. But maybe you are concerned about preserving 
the insertion order of the listeners?

-------------

PR: https://git.openjdk.org/jdk/pull/12081

Reply via email to