Hello, so let’s say I happen to create 3 array list to do something in my program. Now, I don’t wanna have to defer ArrayList.deini() for each 3. So I decide to use an Arena Allocator and use that allocator for the 3 lists. Would just calling Arena.deinit() guarantee that the memory for all 3 of my ArrayList is freed? Or is it possible that moemory would be leaked and nothing would be picked up because Arena.deinit() was called?
Just be aware that using growing (and thus re-allocating) data structures with arenas can cause a lot of fragmentation and unusable memory space within the arena, it depends on your usage patterns and how and when those data structures grow / are resized.
If the arena is short lived this may not matter for your program.