Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure child instantiation service instances are disposed/tracked for disposal #212879

Open
jrieken opened this issue May 16, 2024 · 2 comments
Assignees
Labels
debt Code quality issues
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented May 16, 2024

Since recently the instantiation service is disposable. A instantiation service will dispose all service instances it has created and will dispose all its children. In return, children should also be explicitly disposed so that they get released from their parents. This item tracks the adoption of registering child instantiation service instances with a disposable.

* This became an issue because we now prevent GC'ing of child service and thereby implicit clean-up. So, while this is more work/tracking it is true disposing of services. Overall, this isn't severe because the vast majority of insta-children are for scoped context key services

@jrieken
Copy link
Member Author

jrieken commented May 16, 2024

Best-guess assignment, please re-assign along the way. A sample adoption is d1fdc09

  • src/vs/workbench/api/browser/mainThreadCLICommands.ts @aeschli
  • src/vs/workbench/api/common/extHostExtensionService.ts
  • src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts @alexr00
  • src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @Tyriar
  • src/vs/workbench/services/textfile/test/browser/browserTextFileService.io.test.ts
  • src/vs/workbench/services/textfile/test/electron-sandbox/nativeTextFileService.io.test.ts
  • src/vs/workbench/services/textfile/test/electron-sandbox/nativeTextFileService.test.ts
  • src/vs/workbench/test/browser/contributions.test.ts

@jrieken jrieken added the debt Code quality issues label May 16, 2024
@bpasero bpasero added this to the On Deck milestone May 18, 2024
TylerLeonhardt added a commit that referenced this issue May 18, 2024
johnyongbeyondsoft pushed a commit to johnyongbeyondsoft/vscode that referenced this issue May 20, 2024
johnyongbeyondsoft pushed a commit to johnyongbeyondsoft/vscode that referenced this issue May 20, 2024
@bpasero bpasero removed their assignment May 21, 2024
mustard-mh pushed a commit to gitpod-io/openvscode-server that referenced this issue May 22, 2024
mustard-mh pushed a commit to gitpod-io/openvscode-server that referenced this issue May 22, 2024
@jrieken jrieken modified the milestones: On Deck, June 2024 May 28, 2024
@jrieken jrieken modified the milestones: June 2024, July 2024 Jun 24, 2024
@sandy081 sandy081 removed their assignment Jun 28, 2024
sandy081 added a commit that referenced this issue Jun 29, 2024
* #212879 dispose child instantiation service

* fix tests
@roblourens roblourens removed their assignment Jul 1, 2024
aaronchucarroll pushed a commit to aaronchucarroll/vscode that referenced this issue Jul 10, 2024
@alexr00
Copy link
Member

alexr00 commented Jul 12, 2024

Took care of mine last month with #213808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Code quality issues
Projects
None yet
Development

No branches or pull requests

10 participants