From 56aec5eb475f440aded21bdf7ac60a0a097daa5e Mon Sep 17 00:00:00 2001 From: Simon Siefke Date: Tue, 17 Dec 2024 22:58:32 +0100 Subject: [PATCH 1/4] fix: memory leak in settings indicators --- .../preferences/browser/settingsEditorSettingIndicators.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts index 76b3878ed8516..f8118a9309357 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts @@ -362,6 +362,7 @@ export class SettingsTreeIndicatorsLabel implements IDisposable { } updateScopeOverrides(element: SettingsTreeSettingElement, onDidClickOverrideElement: Emitter, onApplyFilter: Emitter) { + this.scopeOverridesIndicator.disposables.clear(); this.scopeOverridesIndicator.element.innerText = ''; this.scopeOverridesIndicator.element.style.display = 'none'; this.scopeOverridesIndicator.focusElement = this.scopeOverridesIndicator.element; @@ -409,7 +410,6 @@ export class SettingsTreeIndicatorsLabel implements IDisposable { // just to click into the one override there is. this.scopeOverridesIndicator.element.style.display = 'inline'; this.scopeOverridesIndicator.element.classList.remove('setting-indicator'); - this.scopeOverridesIndicator.disposables.clear(); const prefaceText = element.isConfigured ? localize('alsoConfiguredIn', "Also modified in") : From 9124c456f2e03de637542683f5a6d8da8e77650a Mon Sep 17 00:00:00 2001 From: Simon Siefke Date: Tue, 17 Dec 2024 23:10:39 +0100 Subject: [PATCH 2/4] fix: memory leak in settings indicators --- .../preferences/browser/settingsEditorSettingIndicators.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts index f8118a9309357..5505b8d96a773 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts @@ -194,6 +194,7 @@ export class SettingsTreeIndicatorsLabel implements IDisposable { }; this.addHoverDisposables(disposables, syncIgnoredElement, showHover); + return { element: syncIgnoredElement, label: syncIgnoredLabel, @@ -359,6 +360,7 @@ export class SettingsTreeIndicatorsLabel implements IDisposable { for (const indicator of this.parenthesizedIndicators) { indicator.disposables.dispose(); } + this.scopeOverridesIndicator.disposables.dispose(); } updateScopeOverrides(element: SettingsTreeSettingElement, onDidClickOverrideElement: Emitter, onApplyFilter: Emitter) { From a42485bf79840672db8f671c526b2bfdf40baf05 Mon Sep 17 00:00:00 2001 From: Simon Siefke Date: Tue, 17 Dec 2024 23:11:32 +0100 Subject: [PATCH 3/4] undo change --- .../preferences/browser/settingsEditorSettingIndicators.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts index 5505b8d96a773..d515e4ac9178a 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts @@ -360,7 +360,6 @@ export class SettingsTreeIndicatorsLabel implements IDisposable { for (const indicator of this.parenthesizedIndicators) { indicator.disposables.dispose(); } - this.scopeOverridesIndicator.disposables.dispose(); } updateScopeOverrides(element: SettingsTreeSettingElement, onDidClickOverrideElement: Emitter, onApplyFilter: Emitter) { From fed530b9e94d6097fe996b18020d00cfc35d2c77 Mon Sep 17 00:00:00 2001 From: Simon Siefke Date: Tue, 17 Dec 2024 23:12:43 +0100 Subject: [PATCH 4/4] undo change --- .../preferences/browser/settingsEditorSettingIndicators.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts index d515e4ac9178a..f8118a9309357 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.ts @@ -194,7 +194,6 @@ export class SettingsTreeIndicatorsLabel implements IDisposable { }; this.addHoverDisposables(disposables, syncIgnoredElement, showHover); - return { element: syncIgnoredElement, label: syncIgnoredLabel,