fix: memory leak in test results - #333244
Merged
Connor Peet (connor4312) merged 5 commits intoSep 1, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Simon Siefke (SimonSiefke)
August 28, 2026 20:03
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes test-result memory leaks by disposing UI and result-owned resources deterministically.
Changes:
- Tracks disposable stores by test result.
- Disposes stores when results are cleared or evicted.
- Registers the results view’s
SplitViewfor disposal.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
testResultService.test.ts |
Verifies cleared results are disposed. |
testResultService.ts |
Manages per-result disposable stores. |
testResultsViewContent.ts |
Registers the split view for disposal. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Connor Peet (connor4312)
previously approved these changes
Aug 31, 2026
Connor Peet (connor4312)
left a comment
Member
There was a problem hiding this comment.
nice, thanks!
Connor Peet (connor4312)
enabled auto-merge
August 31, 2026 15:41
roblourens
previously approved these changes
Aug 31, 2026
Vritant Bhardwaj (vritant24)
previously approved these changes
Aug 31, 2026
Dmitriy Vasyura (dmitrivMS)
requested changes
Aug 31, 2026
auto-merge was automatically disabled
September 1, 2026 14:34
Head branch was pushed to by a user without write access
Simon Siefke (SimonSiefke)
dismissed stale reviews from Vritant Bhardwaj (vritant24), roblourens, and Connor Peet (connor4312)
via
September 1, 2026 14:34
b4b2422
Simon Siefke (SimonSiefke)
force-pushed
the
fix/memory-leak-testResultsViewContent
branch
from
September 1, 2026 14:47
b4b2422 to
9f87857
Compare
Connor Peet (connor4312)
approved these changes
Sep 1, 2026
Connor Peet (connor4312)
enabled auto-merge
September 1, 2026 16:27
Vritant Bhardwaj (vritant24)
approved these changes
Sep 1, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 1, 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 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
Clearing test results left two ownership paths reachable:
TestResultsViewContentdid not dispose itsSplitView, andTestResultServiceremoved completed results without disposing their result-specific stores.Change
Register the split view with its owning content and track result stores by result so removed and evicted results are disposed deterministically.
Before
When running and clearing test results for 37 cycles, 183 named-function rows remain retained, including output-view UI graphs and one
LiveTestResultwith its raw output per cycle:After
No more matching test-results leak is detected. The matching 37-cycle result contains zero retained named-function rows.
Test Video
test-video.webm