mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Query Editor Memory improvements (#3041)
* working through memory issues * work in progress * add missing value * work in progress * more work in progress * various more memory fixes * additional improvements * fix imports * change test that we dispose queries on close not dispose * update tests
This commit is contained in:
@@ -29,6 +29,13 @@ export class ResultsViewState {
|
||||
constructor(@IConfigurationService private configurationService: IConfigurationService) {
|
||||
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this.gridPanelState.dispose();
|
||||
this.messagePanelState.dispose();
|
||||
this.chartState.dispose();
|
||||
this.queryPlanState.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,7 +57,11 @@ export class QueryResultsInput extends EditorInput {
|
||||
public readonly onRestoreViewStateEmitter = new Emitter<void>();
|
||||
public readonly onSaveViewStateEmitter = new Emitter<void>();
|
||||
|
||||
public readonly state = new ResultsViewState(this.configurationService);
|
||||
private _state = new ResultsViewState(this.configurationService);
|
||||
|
||||
public get state(): ResultsViewState {
|
||||
return this._state;
|
||||
}
|
||||
|
||||
constructor(private _uri: string,
|
||||
@IConfigurationService private configurationService: IConfigurationService
|
||||
@@ -60,6 +71,12 @@ export class QueryResultsInput extends EditorInput {
|
||||
this._hasBootstrapped = false;
|
||||
}
|
||||
|
||||
close() {
|
||||
this.state.dispose();
|
||||
this._state = undefined;
|
||||
super.close();
|
||||
}
|
||||
|
||||
getTypeId(): string {
|
||||
return QueryResultsInput.ID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user