{{ message }}
Repository navigation
fix: memory leak in pending quick pick items - #340846
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit intoOct 13, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The cleanup is scoped to the correct request and is comprehensively covered by targeted tests.
0 open findings
What changed in this PR
Fixes retained pending quick-pick requests when a picker closes before its items resolve.
Changes:
- Cleans up pending item requests in
$showviafinally. - Adds coverage for closure, cancellation, errors, accepted items, and concurrent pickers.
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 13, 2026
Collaborator
Bhavya U (bhavyaus)
approved these changes
Oct 13, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
October 13, 2026 03:41
Martin Aeschlimann (aeschli)
approved these changes
Oct 13, 2026
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-quickPickPendingItemsDisposal
branch
October 13, 2026 09:40
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
Closing a quick pick while its item promise is pending leaves the request in MainThreadQuickOpen._items. The extension host stops supplying items after the picker closes, so the pending request and its picker stay in the map.
Change
Remove the request in the show operation's finally block. Cleanup uses that request ID and preserves other pending pickers.
Before
When closing quick picks with pending items for 37 cycles, pending request records and QuickPick widgets each rise from 0 to 37.
After
No more leak detected.
Test Video
test-video.webm
AI disclosure: Model: GPT-6.1-Sol. Worktime: 17 min