Repository navigation
fix: memory leak in extensions view - #330210
Merged
Benjamin Christopher Simmonds (benibenj) merged 1 commit intoAug 13, 2026
Merged
Benjamin Christopher Simmonds (benibenj) merged 1 commit into
Benjamin Christopher Simmonds (benibenj) merged 1 commit into
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes lifecycle leaks when Extensions composites are removed or relocated.
Changes:
- Associates progress and child-instantiation resources with each composite.
- Adds regression coverage for progress-scope listener disposal.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/vs/workbench/browser/parts/compositePart.ts |
Disposes composite-scoped resources on removal. |
src/vs/workbench/test/browser/parts/compositePart.test.ts |
Tests listener cleanup after removal. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+189
to
+191
| const disposable = new DisposableStore(); | ||
| const that = this; | ||
| const compositeProgressIndicator = new ScopedProgressIndicator(assertReturnsDefined(this.progressBar), this._register(new class extends AbstractProgressScope { | ||
| const compositeProgressIndicator = disposable.add(new ScopedProgressIndicator(assertReturnsDefined(this.progressBar), disposable.add(new class extends AbstractProgressScope { |
Benjamin Christopher Simmonds (benibenj)
approved these changes
Aug 11, 2026
Benjamin Christopher Simmonds (benibenj)
enabled auto-merge (squash)
August 11, 2026 10:15
Contributor
Author
Sandeep Somavarapu (sandy081)
approved these changes
Aug 13, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Aug 13, 2026
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Benjamin Christopher Simmonds (benibenj)
merged commit Aug 13, 2026
69e469f
into
microsoft:main
27 of 28 checks passed
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
Moving Extensions to the panel and resetting its location leaves event listeners behind. This keeps the old Extensions view in memory.
Change
Dispose the progress scope, progress indicator and child instantiation service when the composite is removed.
Before
When moving the Extensions view to the panel and resetting its location 37 times, the pane composite, Extensions view state, and related callbacks grow:
After
No more matching leak is detected.
Test Video
test-video.webm