fix: memory leak in settings preview indicator - #331990
Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits intoAug 21, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Simon Siefke (SimonSiefke)
August 21, 2026 15:48
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Raymond Zhao (@rzhao271)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a settings indicator hover listener leak by replacing stale registrations during updates.
Changes:
- Tracks preview/experimental hovers with
MutableDisposable. - Adds lifecycle-focused regression coverage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
settingsEditorSettingIndicators.ts |
Replaces and disposes preview hover registrations. |
settingsEditorSettingIndicators.test.ts |
Verifies replacement and final disposal. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Raymond Zhao (rzhao271)
approved these changes
Aug 21, 2026
Bhavya U (bhavyaus)
approved these changes
Aug 21, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Aug 21, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
August 21, 2026 21:51
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Aug 22, 2026
fix: dispose previous settings preview hover Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> (cherry picked from commit 08d4580)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Updating a preview or experimental setting indicator registered another delayed hover without disposing the previous registration. Repeatedly switching between User and Workspace settings retained its callbacks and DOM listeners.
Change
Keep the preview indicator hover in a
MutableDisposableso each update replaces the previous registration and disposal cleans up the current one.Before
When switching between User and Workspace settings 37 times,
resolveHoverOptionsand its hover callbacks grow by 444 instances, whileDomListenergrows by 915:After
No more delayed hover listener leak is detected.
Test Video
test-video.webm