diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts b/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts index b26cbdb7db9caaa62d020e15d6877ceb96f5ef13..fbdabb60e5cbcaeac757e10eb6db02eb6f77ad5a 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts @@ -206,6 +206,7 @@ class NotebookCellOutline implements IOutline { dispose(): void { this._dispoables.dispose(); + this._entriesDisposables.dispose(); } private _recomputeState(): void { diff --git a/src/vs/workbench/contrib/outline/browser/outlinePane.ts b/src/vs/workbench/contrib/outline/browser/outlinePane.ts index ede40349c01ffd57d4b30a89d61185dc1c2d9a3d..6873dc62bf71daf3939b09be7d3dde0d34910395 100644 --- a/src/vs/workbench/contrib/outline/browser/outlinePane.ts +++ b/src/vs/workbench/contrib/outline/browser/outlinePane.ts @@ -123,6 +123,8 @@ export class OutlinePane extends ViewPane { if (!visible) { // stop everything when not visible this._editorListener.clear(); + this._editorDisposables.clear(); + } else if (!this._editorListener.value) { this._editorListener.value = Event.any(this._editorService.onDidActiveEditorChange, this._outlineService.onDidChange)(() => { this._handleEditorChanged(this._editorService.activeEditorPane); @@ -201,6 +203,7 @@ export class OutlinePane extends ViewPane { return; } + this._editorDisposables.add(newOutline); this._progressBar.stop().hide(); const tree = , any, FuzzyScore>>this._instantiationService.createInstance(