mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
dispose tree and model in problems view
This commit is contained in:
parent
07926e59b8
commit
26b0272bf3
|
@ -67,7 +67,6 @@ export class MarkersPanel extends Panel {
|
|||
@ITelemetryService telemetryService: ITelemetryService
|
||||
) {
|
||||
super(Constants.MARKERS_PANEL_ID, telemetryService);
|
||||
this.markersModel = new MarkersModel();
|
||||
this.toDispose = [];
|
||||
this.delayedRefresh = new Delayer<void>(1000);
|
||||
this.autoExpanded = new Set.ArraySet<string>();
|
||||
|
@ -75,6 +74,8 @@ export class MarkersPanel extends Panel {
|
|||
|
||||
public create(parent: builder.Builder): TPromise<void> {
|
||||
super.create(parent);
|
||||
this.markersModel = new MarkersModel();
|
||||
|
||||
dom.addClass(parent.getHTMLElement(), 'markers-panel');
|
||||
|
||||
const conf = this.configurationService.getConfiguration<IProblemsConfiguration>();
|
||||
|
@ -307,6 +308,8 @@ export class MarkersPanel extends Panel {
|
|||
public dispose(): void {
|
||||
this.delayedRefresh.cancel();
|
||||
this.toDispose = lifecycle.dispose(this.toDispose);
|
||||
this.tree.dispose();
|
||||
this.markersModel.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
|
@ -259,6 +259,12 @@ export class MarkersModel {
|
|||
return {errors: errors, warnings: warnings, infos: infos, unknwons: unknowns};
|
||||
}
|
||||
|
||||
public dispose() : void {
|
||||
this.markersByResource.clear();
|
||||
this._filteredResources= [];
|
||||
this._nonFilteredResources= [];
|
||||
}
|
||||
|
||||
public getTitle(markerStatistics: MarkerStatistics):string {
|
||||
let title= MarkersModel.getStatisticsLabel(markerStatistics);
|
||||
return title ? title : Messages.MARKERS_PANEL_TITLE_NO_PROBLEMS;
|
||||
|
|
Loading…
Reference in a new issue