RFR 8151486 : Class.forName causes memory leak

Coleen Phillimore coleen.phillimore at oracle.com
Fri Oct 7 18:32:00 UTC 2016


This looks good, Brent.  Really nice job figuring out the cause of the 
leak, and thank you for fixing it!

Coleen


On 10/7/16 2:25 PM, Brent Christian wrote:
> On 10/5/16 4:43 PM, David Holmes wrote:
>>>
>>>> Okay but this will still affect the lifecycle of the PDs because
>>>> without the strong reference in L, those weak references in the VM
>>>> will quickly be cleared.
>
> There's also a strong reference held by the Class object itself (on 
> the VM side [1]).
>
> Thanks for having a look, folks.  I've applied Naoto and Mandy's 
> suggestions for the test case and updated the webrev in place with 
> what I plan to push.
>
> http://cr.openjdk.java.net/~bchristi/8151486/webrev.00/
>
> -Brent
>
> 1. 
> http://hg.openjdk.java.net/jdk9/dev/hotspot/file/fec31089c2ef/src/share/vm/classfile/javaClasses.cpp#l917



More information about the hotspot-dev mailing list