JDK-8341999 : Allow unloading of dynamic Proxy implementation classes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-10-11
  • Updated: 2024-11-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Blocks :  
Description
Dynamic proxy implementation classes are currently strong. With dynamic proxy converted to hidden classes, they can no longer be statically discovered by user code via `Class.forName` and their unloading will have no observable effect. This allows us to garbage collect unused Proxy classes to save some memory.

This requires specification changes to dynamic Proxy, as currently it specifies that Proxy classes are defined only once to the given class loader, which will no longer be true.