Skip to content

Conversation

@SimonSiefke
Copy link
Contributor

Fixes a memory leak in paneCompositeBar.

It seems the paneCompositeBar can be visible for a longer period of time, while it's actions can update many times.

private getCompositeActions(){
  // composite actions are updated, but the already registered ones not disposed here
  this.compositeActions.set(compositeId, compositeActions)
}

By changing the code to use a DisposableMap, it ensures that the previous actions are disposed when the actions are updated.

Before

When renaming a variable 97 times with refactor preview, it seems 3 actions are created each time:

editor rename-with-preview-before

After

When renaming a variable 97 times with refactor preview, no more action leaks are detected:

editor rename-with-preview

@vs-code-engineering
Copy link

vs-code-engineering bot commented Dec 10, 2025

📬 CODENOTIFY

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

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/paneCompositeBar.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants