From 72ecb31c7293cc759e78473ce0d617cac34fcd18 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 25 Jun 2018 15:26:46 +0200 Subject: [PATCH] fix #47553 --- .../referenceSearch/referencesController.ts | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/vs/editor/contrib/referenceSearch/referencesController.ts b/src/vs/editor/contrib/referenceSearch/referencesController.ts index 4f0182c8d6c..2c03e0d6ebc 100644 --- a/src/vs/editor/contrib/referenceSearch/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/referencesController.ts @@ -73,10 +73,12 @@ export abstract class ReferencesController implements editorCommon.IEditorContri } public dispose(): void { - if (this._widget) { - this._widget.dispose(); - this._widget = null; - } + this._referenceSearchVisible.reset(); + dispose(this._disposables); + dispose(this._widget); + dispose(this._model); + this._widget = null; + this._model = null; this._editor = null; } @@ -189,16 +191,12 @@ export abstract class ReferencesController implements editorCommon.IEditorContri } public closeWidget(): void { - if (this._widget) { - this._widget.dispose(); - this._widget = null; - } + dispose(this._widget); + this._widget = null; this._referenceSearchVisible.reset(); this._disposables = dispose(this._disposables); - if (this._model) { - this._model.dispose(); - this._model = null; - } + dispose(this._model); + this._model = null; this._editor.focus(); this._requestIdPool += 1; // Cancel pending requests } -- GitLab