@meggsOmatic You don't, and wouldn't, trace all the references that enter the ar...
Eniko (moved ➡ gamedev.place) @eniko@peoplemaking.games
@meggsOmatic You don't, and wouldn't, trace all the references that enter the arena. A reference to an object within an arena would effectively be a struct containing a regular reference to the arena and an unmanaged pointer to the object inside of it. This means that the arena reference is the only thing that's traced
And yes, arena allocators work on the principle that you allocate a big chunk of memory (using malloc, in a normal arena allocator) and then the lifetime on anything inside of it is the same as the lifetime as the arena, as you'd free the entire chunk of memory when the arena's lifetime is at an end
So for managed arenas the same principle would hold: the lifetime of any object inside the managed arena is equivalent to the lifetime of the arena itself