dispose and clear things out when they are not needed to free up memory (#5805)

This commit is contained in:
Anthony Dresser
2019-05-31 17:24:01 -07:00
committed by Karl Burtram
parent ba58b0f429
commit 23e4a30cd1
4 changed files with 19 additions and 34 deletions

View File

@@ -123,7 +123,7 @@ export class GridPanel {
private runner: QueryRunner;
private maximizedGrid: GridTable<any>;
private _state: GridPanelState;
private _state: GridPanelState | undefined;
constructor(
@IConfigurationService private readonly configurationService: IConfigurationService,
@@ -301,6 +301,7 @@ export class GridPanel {
for (let i = this.splitView.length - 1; i >= 0; i--) {
this.splitView.removeView(i);
}
this._state = undefined;
dispose(this.tables);
dispose(this.tableDisposable);
this.tableDisposable = [];
@@ -346,7 +347,7 @@ export class GridPanel {
});
}
public get state(): GridPanelState {
public get state() {
return this._state;
}