So I made my arena allocator thing and that's cool and useful, I'll inevitably u...

@eniko@peoplemaking.games

So I made my arena allocator thing and that's cool and useful, I'll inevitably use it for something because avoiding garbage allocations in C# can be so dang hard

But I'm still thinking about it as a GC optimization structure. There's nothing that says an arena can't act like a normal GCed object that acts as an opaque container for other objects within so that the GC only has to look at the arena and not all of its contents. Doing this actually solves the issue I have with the arena allocator design in that clearing the arena makes all pointers to items within it stale references, which means any such references act as weak references, which is a blemish on the design

But there's nothing saying you can't just wait to free anything in the arena until your tracing GC has determined the arena is garbage, ie nothing has a reference to it (or its contents) anymore. This would make it work exactly like any other part of a tracing GC system