Past year I've implemented SModel, which is a crate implementing a procedural macro for generating hierarchical structures for use in the semantic model of language compilers.

What worries me is that in my actual project I sometimes create throwaway entities using the arena there (which is simply a vector of Rcs without auto cleanup; allocations result in Weak references). I'm not sure if this is a problem regarding memory, but the arena may indeed accumulate objects and it will never dispose them until the program stops executing.

I think there was a reason I did not use Gc, but I don't remember what exactly it was; I guess I had some serde compiler errors when using it with my parser (but what does this have to do anyway since I don't use fields in my nodes for holding semantic entities? Don't remind for sure.).

I think I also use ByAddress with the objects created in the arena

Source: View source