← Back to context

Comment by lerno

6 months ago

Well the latter is covered: you can make temp allocations out of order when having nested "@pool"s. There are examples in the blog post.

It doesn't solve the case when lifetimes are indeterminate. But often they are well know. Consider "foo(bar())" where "bar()" returns an allocated object that we wish to free after "foo" has used it. In something like C it's easy to accidentally leak such a temporary object, and doing it properly means several lines of code, which might be bad if it's intended for an `if` statement or `while`.