Skip to content

fix: memory leak in source control view - #330241

Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
microsoft:mainfrom
SimonSiefke:fix/memory-leak-source-control-view
Aug 13, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 3 commits into
microsoft:mainfrom
SimonSiefke:fix/memory-leak-source-control-view

Conversation

@SimonSiefke

Copy link
Copy Markdown
Contributor

Details

Moving Source Control between the Activity Bar and panel leaves the old view in memory.

Change

Dispose the composite progress objects when the composite is removed. Also dispose the Source Control resource renderer with its view.

Before

Moving Source Control to the panel and resetting its location 37 times retains SCMViewPane and related objects:

before

After

No leak is detected after 37 runs.

Test Video

test-video.webm

Copilot AI balanced review requested due to automatic review settings August 11, 2026 13:14
@vs-code-engineering

vs-code-engineering Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/workbench/contrib/scm/browser/scmViewPane.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes retained Source Control views when relocating their container.

Changes:

  • Scopes composite progress resources to each composite.
  • Disposes the SCM resource renderer.
  • Adds composite-removal disposal coverage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
compositePart.ts Manages per-composite disposables.
scmViewPane.ts Disposes the resource renderer.
compositePart.test.ts Tests progress-listener cleanup.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dmitrivMS

Copy link
Copy Markdown
Collaborator

Simon Siefke (@SimonSiefke) Please resolve conflcits.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts

auto-merge was automatically disabled August 13, 2026 10:35

Head branch was pushed to by a user without write access

@SimonSiefke
Simon Siefke (SimonSiefke) force-pushed the fix/memory-leak-source-control-view branch from 3f6d085 to 6b2f289 Compare August 13, 2026 10:35
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 3913219 into microsoft:main Aug 13, 2026
27 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.134.0 milestone Aug 13, 2026
@SimonSiefke
Simon Siefke (SimonSiefke) deleted the fix/memory-leak-source-control-view branch August 13, 2026 20:14
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Sep 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants