theia-trace-extension
theia-trace-extension copied to clipboard
Duplicate ExperimentManager and leaking listener
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.