From: Patrick Tasse Date: Thu, 19 May 2016 20:21:44 +0000 (-0400) Subject: tmf: Bug 494077: Closing AbstractTimeGraphView should cancel its threads X-Git-Url: http://git.efficios.com/?p=deliverable%2Ftracecompass.git;a=commitdiff_plain;h=249b9b641178dc1a0b967f6c401aaa20e42b0e55 tmf: Bug 494077: Closing AbstractTimeGraphView should cancel its threads Change-Id: I6eafdb015e1d5f03def8b692964032b1ce00255f Signed-off-by: Patrick Tasse Reviewed-on: https://git.eclipse.org/r/73234 Reviewed-by: Bernd Hufmann Tested-by: Bernd Hufmann Reviewed-by: Hudson CI --- diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java index e14a6e800d..abb3bca922 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java @@ -1374,6 +1374,14 @@ public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeA @Override public void dispose() { super.dispose(); + synchronized (fBuildThreadMap) { + fBuildThreadMap.values().forEach(buildThread -> { + buildThread.cancel(); + }); + } + if (fZoomThread != null) { + fZoomThread.cancel(); + } ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); getSite().getPage().removePartListener(fPartListener); }