fix listener leaks (#17913)

* fix listener leaks

* add null check

* simplify

* pr comments
This commit is contained in:
Alan Ren
2021-12-14 13:35:00 -08:00
committed by GitHub
parent 2b1acbc2c7
commit 970fe12e70
7 changed files with 59 additions and 43 deletions

View File

@@ -480,6 +480,9 @@ export class ConnectionDialogService implements IConnectionDialogService {
this._connectionDialog.onFillinConnectionInputs((input) => this.handleFillInConnectionInputs(input as IConnectionProfile));
this._connectionDialog.onResetConnection(() => this.handleProviderOnResetConnection());
this._connectionDialog.render();
this._connectionDialog.onClosed(() => {
this._model?.dispose();
});
}
this._connectionDialog.newConnectionParams = params;
this._connectionDialog.updateProvider(this._providerNameToDisplayNameMap[this._currentProviderType]);