From 91b99e14454446bac1a998da89020609377044d4 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Sat, 25 May 2024 16:25:24 +0000 Subject: [PATCH] Debt - dispose child instantiation service (#213471) --- src/vs/workbench/contrib/scm/browser/menus.ts | 2 +- src/vs/workbench/contrib/scm/browser/scmViewPane.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/scm/browser/menus.ts b/src/vs/workbench/contrib/scm/browser/menus.ts index 39ee31783bd3a..915abcb3e32ba 100644 --- a/src/vs/workbench/contrib/scm/browser/menus.ts +++ b/src/vs/workbench/contrib/scm/browser/menus.ts @@ -199,7 +199,7 @@ export class SCMRepositoryMenus implements ISCMRepositoryMenus, IDisposable { ]); const serviceCollection = new ServiceCollection([IContextKeyService, this.contextKeyService]); - instantiationService = instantiationService.createChild(serviceCollection); + instantiationService = instantiationService.createChild(serviceCollection, this.disposables); this.titleMenu = instantiationService.createInstance(SCMTitleMenu); this.disposables.add(this.titleMenu); diff --git a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts index 653d2cf3943eb..7f7da99a2a83a 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts @@ -2464,7 +2464,7 @@ class SCMInputWidget { }; const services = new ServiceCollection([IContextKeyService, this.contextKeyService]); - const instantiationService2 = instantiationService.createChild(services); + const instantiationService2 = instantiationService.createChild(services, this.disposables); this.inputEditor = instantiationService2.createInstance(CodeEditorWidget, this.editorContainer, editorConstructionOptions, codeEditorWidgetOptions); this.disposables.add(this.inputEditor);