JDK-7081432 : AppContext holds strong reference to the context class loader even if it is not needed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2011-08-20
  • Updated: 2021-07-13
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
Relates :  
Description
The AppContext class holds the strong reference to the context class loader even if it is not needed anymore.
Steps to reproduce:
1. Create custom class loader
2. Set it is as a context loader of the current thread
3. Create a class object from this class loader
4. Call any method that creates an AppContext instance
   For example, java.awt.Window.getWindows()
5. Replace a context loader with another one
6. Ensure that class could not be collected by GC.
See attachement.