RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

Mandy Chung mchung at openjdk.org
Fri Feb 10 19:29:47 UTC 2023


On Fri, 10 Feb 2023 19:00:53 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> LambdaGC$$Lambda$1 was also strongly linked to its defining class loader, but I don't think that's necessary to keep it alive (because it is referenced from the call site which is referenced from the constant pool cache).

True but it was decided at that time for JEP 371 to make it strong so that the lambda proxy classes will share the same `ClassLoaderData` metaspace as other classes defined by the same loader.   This reduces the memory footprint consumption.

The question is:  what are the use cases for direct call to `LambdaMetafactory` that existing applications depend on?

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

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


More information about the core-libs-dev mailing list