This content has been marked as final.
Show 1 reply
-
1. Re: LoadCache holds strong references to Classloaders - indirectly
adinn Apr 16, 2018 4:15 AM (in response to rajiv.shivane)Hi Rajiv,
rajiv.shivane wrote:
loaderMaps in LoadCache is a WeakHashMap. But since the secondary map in the loaderMaps, holds a strong reference to the class loaded by the Classloader (key of the loaderMap), the ClassLoader is not collectable.
. . .
I believe if the secondary map held a WeakReference to the Class, all the three tests in the test case will pass.
Doh!
Yes, of course. Rookie error :-).
I have raised this JIRA.