theia-trace-extension icon indicating copy to clipboard operation
theia-trace-extension copied to clipboard

Duplicate ExperimentManager and leaking listener

Open PatrickTasse opened this issue 4 years ago • 1 comments

TspClientProvider creates two distinct instances of ExperimentManager, one in its constructor body and another in its addTraceServerUrlChangedListener() call within the constructor.

In ExperimentManager's constructor, a listener is added for the EXPERIMENT_CLOSED signal. This listener is never removed.

It should be checked if multiple instances of TspClientProvider are created when the server path or port is changed in Preferences > Trace Viewer page. If that is the case, then this should trigger a dispose of the previous ExperimentManager so that it can remove its listener.

PatrickTasse avatar Mar 26 '21 19:03 PatrickTasse