Skip to content

Conversation

@Lucretiel
Copy link

@Lucretiel Lucretiel commented Feb 2, 2026

Node::drop no longer clobbers child nodes that have active external handles. It still takes care to drop iteratively rather than recursively, to avoid an unbounded stack growth. As an added benefit, may be marginally more performant, as it now can avoid borrow_mut on the RefCell.

Additionally add a regression test for this behavior.

Fixes #410

@Lucretiel Lucretiel changed the title Fix Node drop recursion Fix Node drop clobbering children Feb 2, 2026
`Node::drop` no longer clobbers nodes that have active external handles
@Lucretiel Lucretiel force-pushed the preserve-recursive-children branch from bf66add to f46fe24 Compare February 2, 2026 21:18
@Lucretiel
Copy link
Author

CI failure is some kind of job cancellation.

@nicoburns
Copy link
Contributor

Ah, no need to worry about the SemVer check. That isn't working yet and doesn't block merging.

@nicoburns nicoburns added the V-non-breaking A non-breaking change label Feb 3, 2026
@github-actions github-actions bot added V-non-breaking A non-breaking change and removed V-non-breaking A non-breaking change labels Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

V-non-breaking A non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rcdom's node's destructor clears all children for nodes that can have strong references outside of the tree

2 participants