United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7081432 : AppContext holds strong reference to the context class loader even if it is not needed

Details
Type:
Bug
Submit Date:
2011-08-20
Status:
Open
Updated Date:
2015-10-29
Project Name:
JDK
Resolved Date:
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P4
Resolution:
Unresolved
Affected Versions:
8
Targeted Versions:
tbd_major

Related Reports
Relates:

Sub Tasks

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.

                                    

Comments



Hardware and Software, Engineered to Work Together