Author: snjeza
Date: 2008-03-31 19:18:20 -0400 (Mon, 31 Mar 2008)
New Revision: 7229
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
JBIDE-1896 JBDS1.0 Massive Memory Leak using JBoss Tool HTML Editor on .XHTML files
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-03-31
23:17:49 UTC (rev 7228)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-03-31
23:18:20 UTC (rev 7229)
@@ -73,7 +73,7 @@
private MozillaEditor visualEditor;
private IEditorPart activeEditor;
private XModelTreeListener listener;
- XModelObject optionsObject;
+ private XModelObject optionsObject;
private SelectionBar selectionBar = new SelectionBar();
private ActivationListener activationListener = new ActivationListener();
private int visualMode = 0;
@@ -472,6 +472,7 @@
public void widgetDisposed(DisposeEvent e) {
container.removeWeightsChangeListener(weightsChangeListener);
+ container.removeDisposeListener(this);
}
});
@@ -489,6 +490,7 @@
public void widgetDisposed(DisposeEvent e) {
parent.removeControlListener(controlListener);
+ container.removeDisposeListener(this);
}
});
@@ -644,6 +646,7 @@
if (optionsObject != null) {
optionsObject.getModel().removeModelTreeListener(listener);
listener=null;
+ optionsObject = null;
}
if (activationListener != null) {
IWorkbenchWindow window = getSite().getWorkbenchWindow();
@@ -678,6 +681,7 @@
selectionBar = null;
}
activeEditor = null;
+ multiPageEditor = null;
super.dispose();
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-03-31
23:17:49 UTC (rev 7228)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-03-31
23:18:20 UTC (rev 7229)
@@ -497,6 +497,7 @@
documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS,
getContentAreaEventListener(), false);
}
getContentAreaEventListener().setVisualEditor(null);
+ getContentAreaEventListener().setEditorDomEventListener(null);
setContentAreaEventTarget(null);
setContentAreaEventListener(null);
documentEventTarget = null;