{{ message }}
Repository navigation
fix: memory leak in MainThreadDebugService - #334102
Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits intoOct 5, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix follows established disposable lifecycle patterns and includes appropriate regression coverage.
Pull request overview
Fixes a MainThreadDebugService leak by disposing provider registrations when unregistered.
Changes:
- Tracks registrations in a handle-keyed
DisposableMap. - Adds regression coverage for registration disposal.
File summaries
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
October 5, 2026 08:11
Dmitriy Vasyura (dmitrivMS)
previously approved these changes
Oct 5, 2026
Giuseppe Cianci (Giuspepe)
previously approved these changes
Oct 5, 2026
Sandeep Somavarapu (sandy081)
previously approved these changes
Oct 5, 2026
Preserve configuration-provider and descriptor-factory registration cleanup and both regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
dismissed stale reviews from Sandeep Somavarapu (sandy081), Giuseppe Cianci (Giuspepe), and themself
via
October 5, 2026 11:38
6adbda0
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 5, 2026
Benjamin Christopher Simmonds (benibenj)
approved these changes
Oct 5, 2026
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-mainThreadDebugService
branch
October 5, 2026 16:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Details
Registering a debug configuration provider adds its registration disposable to the MainThreadDebugService lifetime store. Unregistering the provider removes it from the debug configuration manager but leaves that disposable in the store, so the provider callbacks remain until the extension host bridge is disposed.
Change
Store debug configuration registrations by handle and dispose each registration when its provider unregisters.
Before
When registering and disposing a debug configuration provider 37 times, the provider callback and registration disposal closure each grow by 37:
After
No more debug configuration provider callback or disposal closure leak is detected.
Test Video
debug-provider-test-video.webm