Repository navigation
fix(core): free a removed relayout boundary from the boundary queue - #1009
Merged
Merged
Conversation
houko
force-pushed
the
fix/relayout-boundary-slots
branch
from
November 20, 2026 15:03
e35838f to
8bc62c7
Compare
relayoutBoundaries popped Tree.boundaries without clearing the slot, so the backing array kept every boundary it had laid out, and through each the whole subtree it was in, until a later queue as long reused the slot. A view hidden or rebuilt after being laid out on its own stayed in memory, and an app switching between views kept a removed copy per slot. The pop now clears the slot. Fixes #NNN
The previous commit's CHANGELOG line and Fixes footer held #NNN until the issue was filed. Fixes nsgo-dev#1007
houko
force-pushed
the
fix/relayout-boundary-slots
branch
from
November 20, 2026 15:45
8bc62c7 to
f7a4874
Compare
Collaborator
|
Reviewed. Thank you, @iFwu!
|
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.
Summary
Fixes #1007.
relayoutBoundariespoppedTree.boundarieswithout clearing the slot, so the backing array kept every boundary it had laid out, and through each the whole subtree it was in, until a later queue as long reused the slot. A view hidden or rebuilt after being laid out on its own stayed in memory. The pop now clears the slot.core/layout.go: clear the popped slot.core/layout_test.go:TestRemovedRelayoutBoundariesAreFreedlays out two boundaries on their own, hides, shows and hides them again, then checks that both are collected. It fails on main.CHANGELOG.md: anUnreleasedline.Targets
core,base,ui,tsx, thensgotool)Screenshots
None.
Verification
go tool nsgo test -run '^TestRemovedRelayoutBoundariesAreFreed$' ./corefails on main at211434ba(a boundary removed two showings ago stays in memory) and passes with this change, also with-count=3.go tool nsgo checkon Linux x86_64 (the host): passes.go tool nsgo teston Linux x86_64 under Xvfb (GDK_BACKEND=x11,GSK_RENDERER=cairo): 3,061 passed, 8 failed, 59 skipped. The same 8 fail on main in the same environment:TestAccessibilitySelectedAndExpandedReachATSPI(no AT-SPI registry),TestVideoShowsWhatIsBehindItsTransparentPixels(no GStreamer plug-in for the alpha WebM), and sixTestInstance*whose socket path passed the address limit under this run's longTMPDIR; all six pass with a short one.-targettests, as nothing here is backend-specific; Windows, web and Apple's mobile targets.Checklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.CHANGELOG.md'sUnreleasedhas a line for a capability users can see.