RE: Client is not releasing memory grabbed to hold images Bill Tracey 6.Feb.09 07:29 PM a Web browser Client for Desktop 6.1.2Windows XP
John,
Try adding -Xmaxf0.4 -Xminf0.1 -Xcompactgc -Xcompactexplicitgc to your JVM arguments. To further 'encourage' it to GC try a thread like this:
long total ;
long last_total = Long.MAX_VALUE;
Runtime rt = Runtime.getRuntime();
while ( true ) {
System.runFinalization();
System.gc();
total = rt.totalMemory();
if ( total >= last_total ) { // memory not shrinking any more
break;
}
try {
Thread.sleep(500); // let's not be a total cpu hog
}
catch ( InterruptedException ignored ) { }
}