Skip to content

Commit f4c03dd

Browse files
committed
fix memory leak
1 parent 8451eb5 commit f4c03dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export class NotebookCellOutlineProvider {
185185

186186
dispose(): void {
187187
// selectionListener.clear();
188+
this._entriesDisposables.dispose();
188189
this._dispoables.dispose();
189190
}
190191

@@ -329,6 +330,11 @@ export class NotebookCellOutlineProvider {
329330
};
330331
if (this._configurationService.getValue(OutlineConfigKeys.problemsEnabled)) {
331332
markerServiceListener.value = this._markerService.onMarkerChanged(e => {
333+
if (notebookEditorWidget.isDisposed) {
334+
console.error('notebook editor is disposed');
335+
return;
336+
}
337+
332338
if (e.some(uri => notebookEditorWidget.getCellsInRange().some(cell => isEqual(cell.uri, uri)))) {
333339
doUpdateMarker(false);
334340
this._onDidChange.fire({});

0 commit comments

Comments
 (0)