i have the following code.
BufferedImage img=new BufferedImage(29342,450,BufferedImage.TYPE_INT_RGB );
g2d.drawImage(r.getAsBufferedImage(), 0, 0, null);
but i cannot free img object all uts memory since i know there is the reference to it, but for this problem how to solve it? thanks.