Repository navigation
fix: memory leak in historyService - #327518
Merged
Dmitriy Vasyura (dmitrivMS) merged 4 commits intoJul 31, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 4 commits into
Dmitriy Vasyura (dmitrivMS) merged 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a HistoryService memory leak by removing editor disposal listener entries after execution.
Changes:
- Deletes and disposes listener-map entries before invoking disposal callbacks.
- Adds regression coverage verifying listener cleanup.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
historyService.ts |
Cleans up editor disposal listener entries. |
historyService.test.ts |
Tests listener-map cleanup after editor disposal. |
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
July 31, 2026 00:59
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Dmitriy Vasyura (dmitrivMS)
approved these changes
Jul 31, 2026
Robo (deepak1556)
approved these changes
Jul 31, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
HistoryService kept disposal callbacks for editor inputs in
editorHistoryListenersafter they ran. Disposed custom editor inputs therefore stayed reachable and retained their custom editor models and overlay webviews.Change
Delete and dispose the listener-map entry when the editor's
onWillDisposeevent fires, before running the history callback.Before
When running
debug-javascript-performance-profile37 times, custom editor models, overlay webviews, and their retaining callbacks grow (outlined in red):After
No more custom editor model, overlay webview, or retaining callback growth is detected.
Test Video
historyService-test-video.webm