Closed mumbleskates closed 8 months ago
whoops! i am pretty sure i was wrong about this one. the arena's memory is kept alive by the unsafe pointer, it's just getting disposed because arena
is not referenced after the garbage collection cycles. i've not been able to make a later-used arena dispose early, or make two arenas' memory alias (unless ownership is stored in another arena, in which case they absolutely get disposed of, due to #14
"Live" arenas are not kept alive by strong pointers, only by weak
unsafe.Pointer
s; as far as the GC is concerned, these do not count as references to the memory and the allocation can be deleted.https://go.dev/play/p/9uDhMWAdBC2