Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a node outside of a cursors scope #57

Open
Emmeral opened this issue Nov 22, 2024 · 1 comment · May be fixed by #63
Open

Using a node outside of a cursors scope #57

Emmeral opened this issue Nov 22, 2024 · 1 comment · May be fixed by #63
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Emmeral
Copy link

Emmeral commented Nov 22, 2024

How to use a Node that was retrieved by a TreeCursor once the cursor has been closed?

According to the documentation, the native memory segment backing the Node is cleared once the cursor is deleted. If the tree of the node still exists it is in theory still usable. However, not with the current implementation.

Would it be possible to reassign the Node instance to another arena such that it can still be used afterwards? Either by binding it to Arena.ofAuto() or by adding a method that allows copying the Node to another memory segment management by a user supplied arena?

@ObserverOfTime
Copy link
Member

PR welcome.

@ObserverOfTime ObserverOfTime added the enhancement New feature or request label Nov 22, 2024
@ObserverOfTime ObserverOfTime added the help wanted Extra attention is needed label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
2 participants