On Mon, 14 Jul 2025 15:49:04 GMT, Chris Dennis <[email protected]> wrote:

> Executors shutdown via `shutdownNow()` should have their cleanables cleaned 
> to prevent a classloader leak. This can happen if a classloader exists that 
> both references the wrapped executor and is referenced by the delegate 
> executor.
> 
> To quote @Martin-Buchholz:
>> BTW: I find Cleaners much harder to use than old finalize, and it looks like 
>> I'm not the only one!

This pull request has now been integrated.

Changeset: d5a20799
Author:    Chris Dennis <[email protected]>
Committer: Alan Bateman <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/d5a207994b9c374e6638e57826326f8f4593b96b
Stats:     65 lines in 2 files changed: 63 ins; 1 del; 1 mod

8362123: ClassLoader Leak via Executors.newSingleThreadExecutor(...)

Reviewed-by: vklang, alanb

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

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

Reply via email to