{{ message }}
Repository navigation
fix: memory leak in debug adapter descriptor factory - #334103
Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits intoOct 5, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused lifecycle fix correctly removes retained callbacks and includes suitable regression coverage.
Pull request overview
Fixes debug adapter descriptor factory registration leaks in the extension-host bridge.
Changes:
- Tracks registrations by handle using
DisposableMap. - Disposes registrations immediately when unregistered.
- Adds regression coverage for 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:08
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 5, 2026
Benjamin Christopher Simmonds (benibenj)
approved these changes
Oct 5, 2026
Giuseppe Cianci (Giuspepe)
approved these changes
Oct 5, 2026
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-debugAdapterDescriptorFactory
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 adapter descriptor factory adds its registration disposable to the
MainThreadDebugServicelifetime store. Unregistering the factory removes it from the adapter manager but leaves that disposable in the store, so the factory callback remains until the extension host bridge is disposed.Change
Store debug adapter descriptor factory registrations by handle and dispose each registration when its factory unregisters.
Before
When registering and disposing a debug adapter descriptor factory 37 times, the descriptor callback and registration disposal closure each grow by 37:
After
No debug adapter descriptor callback or registration disposal closure leak is detected.
Test Video
test-video.webm