Skip to content

fix: memory leak in status bar#282246

Merged
jrieken merged 35 commits intomicrosoft:mainfrom
SimonSiefke:fix/memory-leak-status-bar
Dec 16, 2025
Merged

fix: memory leak in status bar#282246
jrieken merged 35 commits intomicrosoft:mainfrom
SimonSiefke:fix/memory-leak-status-bar

Conversation

@SimonSiefke
Copy link
Contributor

@SimonSiefke SimonSiefke commented Dec 9, 2025

Fixes a memory leak in extension host status bar items. Generated by GitHub Copilot.

When a status bar item is added with the $setEntry method, a disposable is being added:

// mainThreadStatus.ts

$setEntry(){
 // disposable added to store, but never removed from store
  this._store.add(toDisposable(() => this.statusbarService.unsetEntry(entryId)));
}

However it doesn't seem to be removed in $disposeEntry

$disposeEntry(entryId: string) {
	this.statusbarService.unsetEntry(entryId);
}

Before

When opening and closing an image editor 97 times, which registers 3 status bar items, the number of MainThreadStatusBar.$setEntry functions grows by 291 (97*3).

image-editor open-original

After

When opening and closing an image editor 97 times, the number of MainThreadStatusBar.$setEntry functions stays constant.

image-editor open

jrieken and others added 30 commits November 7, 2025 12:20
…atee

Bring back model picker for inline chat (release)
…#276070)

Changes defaul of triggerCommandOnProviderChange to false.
Fixes microsoft#276065
… (microsoft#276073)

SCM - fix rendering issue with incoming/outgoing changes nodes
…ng-schema-url-cp

tools: fix wrong data passed to tool schema uri
Fixes microsoft#276167

Workaround until we get proper fix as part of microsoft#274403
…41712340f6f31b8c19fd289

Port 276167 to release
Filter subagent and todo tools from subagent requests
@jrieken jrieken enabled auto-merge December 16, 2025 09:56
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 16, 2025
@jrieken jrieken merged commit 53acfae into microsoft:main Dec 16, 2025
17 checks passed
@SimonSiefke SimonSiefke deleted the fix/memory-leak-status-bar branch January 15, 2026 15:07
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.