Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcdumoulin2012-02-15 18:16:46 -0500
committercdumoulin2012-02-15 18:16:46 -0500
commitff47b796dccb38bddfe6dbcb7d3db589faad4719 (patch)
tree8822e831c3d87e7e2deea87f58c857a24c92c2af /plugins
parent4e744633b39b06a21a4ebb487a778224710d35cb (diff)
downloadorg.eclipse.papyrus-ff47b796dccb38bddfe6dbcb7d3db589faad4719.tar.gz
org.eclipse.papyrus-ff47b796dccb38bddfe6dbcb7d3db589faad4719.tar.xz
org.eclipse.papyrus-ff47b796dccb38bddfe6dbcb7d3db589faad4719.zip
ASSIGNED - bug 366943: [Performance] Editors Memory leaks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=366943 Deregister OperationHistoryListener registered by the NotifyingWorkspaceCommandStack. This remove a path from GC roots.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java
index a7e5a36094b..2b66d1e702e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/NotifyingWorkspaceCommandStack.java
@@ -435,6 +435,14 @@ implements IWorkspaceCommandStack {
domainListener = null;
historyAffectedResources = null;
mostRecentOperation = null;
+
+ // remove listeners registered in opertationHistory
+ Collection<IOperationHistoryListener> values = proxyOperationListeners.values();
+ for( IOperationHistoryListener proxy : values ) {
+ getOperationHistory().removeOperationHistoryListener(proxy);
+ }
+ proxyOperationListeners.clear();
+
}
/**

Back to the top