mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-05 15:36:22 +01:00
fix: memory leak call stack widget (#286246)
fix: memory leak in call stack widget
This commit is contained in:
1 parent
b13bafae49
commit
dc178377f2
1 file changed
+3
-2
@@ -167,8 +167,9 @@ export class CallStackWidget extends Disposable {
|
||||
public setFrames(frames: AnyStackFrame[]): void {
|
||||
// cancel any existing load
|
||||
this.currentFramesDs.clear();
|
||||
this.cts = new CancellationTokenSource();
|
||||
this._register(toDisposable(() => this.cts!.dispose(true)));
|
||||
const cts = new CancellationTokenSource();
|
||||
this.currentFramesDs.add(toDisposable(() => cts.dispose(true)));
|
||||
this.cts = cts;
|
||||
|
||||
this.list.splice(0, this.list.length, this.mapFrames(frames));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user