Repository navigation
fix: memory leak in terminal profile service - #334100
Merged
Megan Rogge (meganrogge) merged 1 commit intoSep 3, 2026
Merged
Megan Rogge (meganrogge) merged 1 commit into
Megan Rogge (meganrogge) merged 1 commit into
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix correctly addresses the leak and includes appropriate regression coverage.
Pull request overview
Fixes terminal profile provider cleanup to prevent retained callbacks.
Changes:
- Removes disposed providers from the nested extension map.
- Removes empty extension maps.
- Adds regression coverage for provider isolation and disposal.
File summaries
| File | Description |
|---|---|
terminalProfileService.ts |
Corrects provider disposal logic. |
terminalProfileService.integrationTest.ts |
Verifies disposed providers are removed without affecting others. |
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.
Megan Rogge (meganrogge)
approved these changes
Sep 3, 2026
Megan Rogge (meganrogge)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks!
Megan Rogge (meganrogge)
enabled auto-merge (squash)
September 3, 2026 15:26
Ladislau Szomoru (lszomoru)
approved these changes
Sep 3, 2026
roblourens
approved these changes
Sep 3, 2026
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-terminalProfileService
branch
September 20, 2026 07:39
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Sep 23, 2026
fix: dispose terminal profile providers (cherry picked from commit 0ad3373)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 terminal profile provider adds it to the profile service map for its extension. Disposing the registration deletes the provider ID from the outer extension map instead of the nested provider map, so the provider remains registered.
Change
Delete the provider from the extension nested map and remove the map when it becomes empty.
Before
When registering and disposing a terminal profile provider 37 times,
createContributedTerminalProfilegrows by 37:After
No more terminal profile provider callback leak is detected.
Test Video
terminal-profile-test-video.webm