Skip to content

fix: memory leak in markersTable - #327885

Merged
Ladislau Szomoru (lszomoru) merged 3 commits into
microsoft:mainfrom
SimonSiefke:fix/memory-leak-markers-table
Aug 17, 2026
Merged

fix: memory leak in markersTable#327885
Ladislau Szomoru (lszomoru) merged 3 commits into
microsoft:mainfrom
SimonSiefke:fix/memory-leak-markers-table

Conversation

@SimonSiefke

Copy link
Copy Markdown
Contributor

Details

Link-style diagnostic codes create a new HighlightedLabel for each Problems table row. The label was owned by the table template, so removed rows stayed reachable until the template was disposed.

Change

Separate template and element disposables and clear per-row labels, action-bar items, and listeners when a table element is disposed.

Before

When repeatedly removing and re-adding a linked diagnostic in the Problems table for 37 runs, HighlightedLabel grows by 37 instances:

markers-table-diagnostic-refresh-before

After

No more matching HighlightedLabel leak is detected.

Test Video

markers-table-diagnostic-refresh-after.webm
Copilot AI review requested due to automatic review settings July 28, 2026 19:43

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 per-row disposable retention in the Problems table.

Changes:

  • Separates template- and element-scoped disposables.
  • Clears linked labels, quick-fix actions, and listeners when rows are disposed.
@dmitrivMS

Copy link
Copy Markdown
Collaborator
@lszomoru
Ladislau Szomoru (lszomoru) merged commit 702b3b0 into microsoft:main Aug 17, 2026
27 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.135.0 milestone Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants