From 80948a6f0db902be6fbffd9371a498d2918fb086 Mon Sep 17 00:00:00 2001 From: Robert Roth Date: Sun, 3 May 2015 09:47:48 +0300 Subject: [PATCH] Bug 283255 - GradientBackgroundListener leaks controls When the control having the GradientBackgroundListener is disposed, let's remove it from the map to avoid leaking the disposed controls. Change-Id: If694d46cc15bcc5541c76de2a346316d5262357f Signed-off-by: Robert Roth --- .../eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java index c071e15..0fe5cfa 100644 --- a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java +++ b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java @@ -10,6 +10,7 @@ * IBM Corporation * Kai Toedter - added radial gradient support * Lars Vogel - Bug 461688 + * Robert Roth - Bug 283255 *******************************************************************************/ package org.eclipse.e4.ui.css.swt.properties; @@ -53,7 +54,7 @@ public class GradientBackgroundListener implements Listener { private DisposeListener disposeListener = new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { - dispose(); + GradientBackgroundListener.remove(control); } }; -- 2.7.4