From 358f15fb9bbcd59d83984d9ffca6fdbd82ea5866 Mon Sep 17 00:00:00 2001 From: Simon Siefke Date: Wed, 13 Dec 2023 00:13:57 +0100 Subject: [PATCH] fix: memory leak when scrolling in notebook (#200447) * fix: memory leak when scrolling in notebook * remove unused code * remove unused code * remove unused code --- src/vs/platform/actions/browser/menuEntryActionViewItem.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts index e0081e27068..15abc82b4be 100644 --- a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts +++ b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts @@ -381,11 +381,11 @@ export class DropdownWithDefaultActionViewItem extends BaseActionViewItem { }; this._dropdown = new DropdownMenuActionViewItem(submenuAction, submenuAction.actions, this._contextMenuService, dropdownOptions); - this._dropdown.actionRunner.onDidRun((e: IRunEvent) => { + this._register(this._dropdown.actionRunner.onDidRun((e: IRunEvent) => { if (e.action instanceof MenuItemAction) { this.update(e.action); } - }); + })); } private update(lastAction: MenuItemAction): void {