Thanks!

But, does this mean that if I allocate using new(existing_ir) ir_foo()
or opposed to new(talloc_parent(existing_ir)) ir_foo() then this new
object will always remain alive as long as existing_ir is alive, even
if it's no longer referenced?

If so, why would anyone do that, which seems to occur frequently in
the codebase?

And why is an hierarchical ownership model useful at all, instead of
just doing a "mark-and-sweep" plus copying phase after all
optimizations, or maybe after a given pass if the allocated memory
grows too much?

Also, how about just keeping the context in a thread-local variable
and using it automatically, possibly in a global way with a gc root
registration mechanism?
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to