Skip to content

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Apr 25, 2025

rbs_node_destroy, rbs_hash_free, rbs_node_list_free are only calling each other recursively without any real freeing logic.

This is the result of previous efforts to allocate all nodes on the arena. So we don't need these functions anymore.

Discovered while working on #41

`rbs_node_destroy`, `rbs_hash_free`, `rbs_node_list_free` are only
calling each other recursively without any real freeing logic.

This is the result of previous efforts to allocate all nodes on the
arena. So we don't need these functions anymore.
Copy link

@amomchilov amomchilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha to think how much effort went into writing this, once upon a time.

And with memory arenas, it can all go poof. Love it!

@st0012 st0012 force-pushed the remove-unnecessary-freeing-functions branch from a3b2ec9 to 76985ca Compare April 25, 2025 12:57
@st0012
Copy link
Member Author

st0012 commented Apr 25, 2025

@amomchilov Should've included this in your talk 🙈

@st0012 st0012 merged commit 73060a6 into c-api Apr 25, 2025
19 of 20 checks passed
@st0012 st0012 deleted the remove-unnecessary-freeing-functions branch April 25, 2025 13:08
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.

2 participants