fix: memory leak in issueReporterOverlay - #335102
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit intoSep 18, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
Conversation
Copilot started reviewing on behalf of
Simon Siefke (SimonSiefke)
September 8, 2026 16:44
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused cleanup changes are correct and covered by relevant regression tests.
Pull request overview
Fixes disposable retention in the issue reporter’s screenshot annotation workflow.
Changes:
- Adds scoped stores for annotation editors and thumbnail listeners.
- Disposes obsolete listeners when thumbnails rebuild.
- Adds regression tests for editor and listener cleanup.
File summaries
| File | Description |
|---|---|
issueReporterOverlay.ts |
Implements scoped lifecycle cleanup. |
issueReporterOverlay.test.ts |
Tests disposal and listener removal. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 18, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 18, 2026 10:24
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Nick Trogh (ntrogh)
approved these changes
Sep 18, 2026
Henning Dieterichs (hediet)
approved these changes
Sep 18, 2026
Dmitriy Vasyura (dmitrivMS)
merged commit Sep 18, 2026
7569151
into
microsoft:main
33 of 34 checks passed
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-issueReporterOverlay
branch
September 20, 2026 07:39
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Sep 23, 2026
(cherry picked from commit 7569151)
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
Saving or discarding an annotation editor left the closed editor and its event subscriptions in the issue reporter's disposable store. Rebuilding screenshot thumbnails also left the previous thumbnails' listeners in that store.
Change
Give each annotation editor a disposable store and remove it on save or discard. Clear thumbnail listeners whenever the thumbnails are rebuilt.
Before
After 37 screenshot annotation reopening cycles, 74 closed annotation editors and 148 DOM listener objects remained, along with their callbacks.
After
No more annotation-editor or thumbnail-listener growth is detected by named-function-count3 over the same 37 cycles.
Test Video
Seven screenshot annotation reopening cycles were recorded and completed successfully.
annotation-test.webm