Skip to content

Make sure content part disposes of refs#303620

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/tender-puffin
Mar 20, 2026
Merged

Make sure content part disposes of refs#303620
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/tender-puffin

Conversation

@mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Mar 20, 2026

Fixes #303547

Copilot AI review requested due to automatic review settings March 20, 2026 21:21
@mjbvz mjbvz enabled auto-merge March 20, 2026 21:21
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 20, 2026
Copy link
Contributor

Copilot AI left a comment

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 mjbvz merged commit 1ec1913 into microsoft:main Mar 20, 2026
22 checks passed
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.

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

3 participants