aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classes/share/javax/media/j3d/Canvas3D.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java
index 86f5316..4261c1f 100644
--- a/src/classes/share/javax/media/j3d/Canvas3D.java
+++ b/src/classes/share/javax/media/j3d/Canvas3D.java
@@ -927,7 +927,7 @@ public class Canvas3D extends Canvas {
CanvasViewEventCatcher canvasViewEventCatcher;
// The parent window for this canvas.
- Container parent;
+ private Container parent;
// flag that indicates if light has changed
boolean lightChanged = false;
@@ -1495,6 +1495,11 @@ public class Canvas3D extends Canvas {
if (rdr != null) {
rdr.userStop = false;
}
+
+ // Fix for issue 102 removing strong reference and avoiding memory leak
+ // due retention of parent container
+
+ this.parent = null;
}
// This decides if the canvas is active