Java 7, soft references not being cleaned?

John Hendrikx hjohn at xs4all.nl
Sat Feb 18 15:21:00 PST 2012


Please disregard this post, it turns out the issue had nothing to do 
with SoftReferences or the garbage collector at all.  It only looked as 
if the GC was having trouble cleaning up things despite the heap not 
being full yet.

Instead it was a piece of code which was doing exponentionally more work 
every time it was triggered (related to JavaFX's binding mechanism), so 
it was this code that was using all the CPU (doing basically nothing but 
triggering a lot of GC activity) and not the GC.

My apologies,
--John Hendrikx

On 17/02/2012 17:54, John Hendrikx wrote:
> I've written a fairly small program that runs in 256 MB -- this program
> will load several large pictures, which are being "cached" using
> SoftReferences.
>
> The more of these pictures get loaded, the more the GC starts panicing
> (while in reality, more than 200 MB in the VM is only held by
> SoftReferences).
>
>



More information about the hotspot-gc-use mailing list