Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcdumoulin2012-02-15 18:21:34 -0500
committercdumoulin2012-02-15 18:21:34 -0500
commit645abd3a3a2abbfa3460d3ef47ef8e793402822e (patch)
treee1f5d17f1daa360daaa6c6729eff1ff24f6930fc /plugins
parent9f8f0dd34389e16ee5c14d80f12802d907a2b2b9 (diff)
downloadorg.eclipse.papyrus-645abd3a3a2abbfa3460d3ef47ef8e793402822e.tar.gz
org.eclipse.papyrus-645abd3a3a2abbfa3460d3ef47ef8e793402822e.tar.xz
org.eclipse.papyrus-645abd3a3a2abbfa3460d3ef47ef8e793402822e.zip
ASSIGNED - bug 366943: [Performance] Editors Memory leaks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=366943 Improve MultiPageEditorSite disposal.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java7
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite4x.java6
2 files changed, 12 insertions, 1 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
index 65b339d6200..3a449b214b3 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
@@ -19,7 +19,6 @@ import org.eclipse.jface.viewers.IPostSelectionProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorActionBarContributor;
@@ -231,6 +230,12 @@ public class MultiPageEditorSite implements IMultiPageEditorSite, INestable {
if(serviceLocator != null) {
serviceLocator.dispose();
}
+
+ // dispose properties to help GC
+ setSelectionProvider(null);
+ mainEditorSite = null;
+ editor = null;
+ actionBarContributor = null;
}
/**
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite4x.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite4x.java
index b56ddcb1a4d..912b76d57c7 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite4x.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite4x.java
@@ -324,6 +324,12 @@ public class MultiPageEditorSite4x implements IMultiPageEditorSite, INestable {
}
context.dispose();
+ // dispose properties to help GC
+ setSelectionProvider(null);
+ mainEditorSite = null;
+ editor = null;
+ actionBarContributor = null;
+
}
/**

Back to the top