Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2014-08-12 16:20:08 -0400
committerSam Davis2014-08-18 19:03:24 -0400
commit2adc9e4dab15cc887c26fec8e51f05055088c0e7 (patch)
tree77143fb9b11c1280a88b3979fd8e0ae70380c772 /org.eclipse.mylyn.reviews.ui/src
parent2f1f622a1a9bf5ed2825dab5e03632e2c1206051 (diff)
downloadorg.eclipse.mylyn.reviews-2adc9e4dab15cc887c26fec8e51f05055088c0e7.tar.gz
org.eclipse.mylyn.reviews-2adc9e4dab15cc887c26fec8e51f05055088c0e7.tar.xz
org.eclipse.mylyn.reviews-2adc9e4dab15cc887c26fec8e51f05055088c0e7.zip
440821: fix memory leak in ReviewCompareInputListener
Change-Id: Iae23aecdd2cff53972f7cb5c1e90271f75d077b8 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=440821
Diffstat (limited to 'org.eclipse.mylyn.reviews.ui/src')
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java
index 0527aa52..a3d2a58d 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewCompareInputListener.java
@@ -51,6 +51,8 @@ import org.eclipse.mylyn.reviews.core.model.ILocation;
import org.eclipse.swt.custom.LineBackgroundEvent;
import org.eclipse.swt.custom.LineBackgroundListener;
import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
@@ -383,6 +385,12 @@ class ReviewCompareInputListener implements ITextInputListener, IReviewCompareSo
support.setAnnotationPreference((AnnotationPreference) e.next());
}
support.install(EditorsUI.getPreferenceStore());
+ sourceViewer.getControl().addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ support.dispose();
+ }
+ });
+
Field overViewRulerField = sourceViewerClazz.getDeclaredField("fOverviewRuler"); //$NON-NLS-1$
overViewRulerField.setAccessible(true);

Back to the top