RFR: 8277072: ObjectStreamClass caches keep ClassLoaders alive
Roman Kennke
rkennke at openjdk.java.net
Mon Nov 15 19:13:36 UTC 2021
On Mon, 15 Nov 2021 18:01:04 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> If the intent of this change is to alter the lifetimes of the objects in question in a meaningful way, I recommend a CSR for the behavioral compatibility impact.
It would be hard for application code to observe this change: before the change, a ClassLoader and its classes could be lingering in the cache longer than necessary, even if otherwise not reachable. With the change, they would be reclaimed as soon as they become unreachable. This could only be observed, if application code holds onto ClassLoader or Class instances via Weak or PhantomReference, and even then I am not sure if that qualifies as 'meaningful'.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6375
More information about the core-libs-dev
mailing list