Skip to content

Make sure content part disposes of refs - #303620

Merged
Matt Bierner (mjbvz) merged 1 commit into
microsoft:mainfrom
mjbvz:dev/mjbvz/tender-puffin
Mar 20, 2026
Merged

Matt Bierner (mjbvz) merged 1 commit into
microsoft:mainfrom
mjbvz:dev/mjbvz/tender-puffin

Conversation

@mjbvz

Copy link
Copy Markdown
Contributor

Fixes #303547

Copilot AI review requested due to automatic review settings March 20, 2026 21:21
@vs-code-engineering vs-code-engineering Bot added this to the 1.113.0 milestone Mar 20, 2026

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

Targets the listener leak reported in #303547 by ensuring code-block-related references created during chat markdown rendering are disposed when the ChatMarkdownContentPart is disposed.

Changes:

  • Import dispose from the lifecycle utilities.
  • Add an override of ChatMarkdownContentPart.dispose() to dispose allRefs and clear the array.

@mjbvz
Matt Bierner (mjbvz) merged commit 1ec1913 into microsoft:main Mar 20, 2026
22 checks passed
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 4, 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.

[1ab] potential listener LEAK detected, having 6511 listeners already. MOST frequent listener (6337)

3 participants