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

Mandy Chung mchung at openjdk.org
Thu Feb 9 17:44:48 UTC 2023


On Thu, 9 Feb 2023 15:20:23 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> 4. the lambda proxy class has the strong relationship with the class loader (that will share the VM metaspace for its defining loader - implementation details)

A lambda proxy class is the implementation of the lambda/method reference in class `C` and it's logical part of class `C` and therefore it has a strong relationship with the class loader.

The VM implementation creates one `ClassLoaderData` in the metaspace space for each "weak" hidden class, i.e. it consumes more C heap memory.  If a hidden class has a strong relationship with its defining loader, it should keep it strong.

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

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


More information about the core-libs-dev mailing list