diff options
author | Vincent Lorenzo | 2017-11-06 16:05:23 +0000 |
---|---|---|
committer | vincent lorenzo | 2017-11-07 10:32:25 +0000 |
commit | ade57bb8de83ade0cbc00388777eaf91fe57cbff (patch) | |
tree | 819912b41f6dd7711082aaafc8856a0491c42157 | |
parent | 6631ac6010ee663d6cf3d6220014c5cfd565e79d (diff) | |
download | org.eclipse.papyrus-ade57bb8de83ade0cbc00388777eaf91fe57cbff.tar.gz org.eclipse.papyrus-ade57bb8de83ade0cbc00388777eaf91fe57cbff.tar.xz org.eclipse.papyrus-ade57bb8de83ade0cbc00388777eaf91fe57cbff.zip |
Bug 526900: [Property View] the class EStructuralFeatureEditor has a memory leak in its implementation
Change-Id: I8ea367007a3c96a02be172b7701b396df983e6d9
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
-rw-r--r-- | plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java index 841cc128464..48497840637 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/EStructuralFeatureEditor.java @@ -12,6 +12,7 @@ * Christian W. Damus (CEA) - bug 448139 * Pierre GAUTIER (CEA LIST) - bug 521857 * Fanch BONNABESSE (ALL4TEC) fanch.bonnabesse@all4tec.net - Bug 521902, Bug 526304 + * Vincent LORENZO (CEA LIST) - bug 526900 *****************************************************************************/ package org.eclipse.papyrus.uml.properties.widgets; @@ -157,8 +158,8 @@ public class EStructuralFeatureEditor implements IValueChangeListener<Object>, I } public void setFeatureToEdit(final String title, final EStructuralFeature feature, final EObject element) { + Composite previousPage = this.currentPage; if (currentPage != null) { - currentPage.dispose(); currentPage = null; } @@ -219,6 +220,9 @@ public class EStructuralFeatureEditor implements IValueChangeListener<Object>, I currentPage = createEmptyPage(); } pageBook.showPage(currentPage); + // we dispose it after the showPage because until the previous line, we continue to display it, so we can't call the dispose! + previousPage.dispose(); + previousPage = null; } protected void setValueEditorProperties(final AbstractValueEditor editor, final EObject stereotypeApplication, final String title, final EStructuralFeature feature) { |