Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@copybara-service
Copy link
Contributor

Clear the fields of a Node inside delete.

This ensures that we don't retain memory to other Node instances and their contents, even in unlikely scenarios in which the user is holding a reference to one specific Node (through an Entry) but not to the others that it refers to.

This requires reading those fields in advance when replacing a node. But given that we already had complex ordering rules to follow in putInverse, I think that this is an improvement.

(This change was prompted by investigation in 2097440.)

RELNOTES=n/a

This ensures that we don't retain memory to other `Node` instances and their contents, even in unlikely scenarios in which the user is holding a reference to one specific `Node` (through an `Entry`) but not to the others that it refers to.

This requires reading those fields in advance when replacing a node. But given that we already had complex ordering rules to follow in `putInverse`, I think that this is an improvement.

(This change was prompted by investigation in 2097440.)

RELNOTES=n/a
PiperOrigin-RevId: 846336997
@copybara-service copybara-service bot merged commit 06376ba into master Dec 18, 2025
@copybara-service copybara-service bot deleted the test_843773709 branch December 18, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant