states "Objects are not explicitly freed. Instead, all allocations from a scratch arena are implicitly freed upon return. This would include error return paths automatically."
How does this implict freeing happen? I don't see a call to free() ever being used in that post
I'm gonna guess because the arena state is in the local stack frame
"Typically arena lifetime is the whole program, so you don’t need to worry about freeing it" I guess they don't free it in this post :D
Обсуждают сегодня