tmf: Dispose analysis modules when the trace is disposed
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 24 Jan 2014 22:06:22 +0000 (17:06 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 27 Jan 2014 19:35:10 +0000 (14:35 -0500)
commita1529f38e193e20fc9a1b4e707b99b9a163dae05
tree1a4774ef0f63c23106f31dc164ec1daae82097d4
parenta03b7ee43d50dde1d5fb97402351e0bd93ccd8de
tmf: Dispose analysis modules when the trace is disposed

There was a dispose() method in the StateSystemAnalysisModule, but
it came from HistoryBuilder, and was about disposing the state provider
only (which we do once the event request is complete, since we will not
need to insert more events in it). It had nothing to do with
ITmfComponent.dispose().

Add a "real" dipose method to the state system module, which disposes
the state system that was built, if any. And then also call that dispose
from TmfTrace.dispose().

This way the analysis module should:
- Correctly deregister from the TmfSignalManager, to be eligible for
  garbage collection.
- Dispose the statesystem object it contains, correctly closing any
  backend files.

Change-Id: I5836009f7172ab4ef9a41e22b5dbc0ef2fccbe4e
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/21072
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/IAnalysisModule.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
This page took 0.026911 seconds and 5 git commands to generate.