I have a class which extends canvas. If this class is implemented as inner class, the instances are never getting garbage collected. It occurs on all platforms. It works fine with Tiger. If the same class is taken out, the objects are gced.
Compile and run attached AWTGCTest. If finalize method is not invoked atleast once, bug is reproduced.
Now change line 19 in the sample code to:
Canvas canvas = new DisplayCanvas();
Compile and run again, finalize method will be called properly and objects are gced.
This causes memory leak in lot many applications and the reliability tests are failing.
###@###.### 2004-11-09 05:57:26 GMT