Repository navigation
fix: memory leak in document drop edits - #336025
Merged
Alexandru Dima (alexdima) merged 2 commits intoSep 14, 2026
Merged
Alexandru Dima (alexdima) merged 2 commits into
Alexandru Dima (alexdima) merged 2 commits into
Conversation
Alexandru Dima (alexdima)
approved these changes
Sep 14, 2026
Member
|
Thank you! |
Alexandru Dima (alexdima)
enabled auto-merge (squash)
September 14, 2026 14:24
Giuseppe Cianci (Giuspepe)
approved these changes
Sep 14, 2026
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-documentDropEdit-cacheIds
branch
September 20, 2026 07:39
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Sep 23, 2026
Fix document drop edit cache release IDs (cherry picked from commit 5aa0954)
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
Document-drop edits are cached using their edit IDs, but the release call sends the separate data-transfer request ID. The extension host therefore leaves the old edits in its cache.
Change
Release the cache IDs returned with the edits. Avoid creating cache entries for empty results, which have no edit ID to release.
Before
When dropping text into an editor 37 times, 37 old drop edits remain in the extension-host cache:
After
No more document-drop edit cache growth is detected in the same 37-cycle test.
Test Video
drop-v2-desktop-video.webm