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);