-
Bug
-
Resolution: Fixed
-
P2
-
1.1
-
None
-
1.1fcs
-
sparc
-
solaris_2.5.1
-
Not verified
The following code from Component.getGraphics() needs to be changed:
if (peer instanceof java.awt.peer.LightweightPeer) {
Graphics g = parent.getGraphics();
return g.create(x, y, width, height);
} else {
...
The original g object was never disposed. We will have to wait
an indeterminate amount of time for those resources to be reclaimed
through garbage collection.
At best, this is creating an extra object unnecessarily. At worst,
this ties up system resources leading to abnormally high memory
usage or even failure due to depleted resources.
if (peer instanceof java.awt.peer.LightweightPeer) {
Graphics g = parent.getGraphics();
return g.create(x, y, width, height);
} else {
...
The original g object was never disposed. We will have to wait
an indeterminate amount of time for those resources to be reclaimed
through garbage collection.
At best, this is creating an extra object unnecessarily. At worst,
this ties up system resources leading to abnormally high memory
usage or even failure due to depleted resources.