When using Graphics.drawImage() to stretch an offscreen image under X11/Motif environment, the JVM process grows indefinitely.
To reproduce the problem, compile the attached 'Stretch.java' application and run it with 'java Stretch'. Resize and/or maximize the window many times while monitoring the process size: the process grows by the size of the image displayed just before the resize. This is quite obvious when maximizing and then restoring the window.
Please note that Image.flush() is called from the Java code in order to free unused memory.
To reproduce the problem, compile the attached 'Stretch.java' application and run it with 'java Stretch'. Resize and/or maximize the window many times while monitoring the process size: the process grows by the size of the image displayed just before the resize. This is quite obvious when maximizing and then restoring the window.
Please note that Image.flush() is called from the Java code in order to free unused memory.
- duplicates
-
JDK-4078566 Memory leak in X11/Motif AWT image_FreeBufs()
- Closed