We have been using BufferedImage objects in our application to render the PNG images, unfortunately after performing certain operations like rotating and resizing the images (in turn these operations create and return the new BufferedImage object with updated length and width) the java heap size goes high and high to lead the OutofMemory error.
Even after closing down the current panel GC is not reclaiming the memory consumed by these BufferedImage object, I have read lot of threads mentioning that older versions of JDK itself (prior to 1.5) having memory leak in BufferedImage, but didn’t find any work around or fix for this. Even in the later versions of JDK for example at the movement we are using jdk1.6.0_26 and still able to see this issue.
It will be great if someone can suggest some tips to stop the memory leak with BufferedImage object or any other alternative implementations for that object?