hematita
hematita copied to clipboard
Garbage Collection
From what I've seen, the project currently handles memory with Arcs, which will leak on cyclic references. Are there plans to use a real garbage collector?
I have plans to use a proper garbage collector but I don't have any details about it figured out at the moment. Any plans for how to implement something like this is welcome.
I have designed a language based on Lua, and implemented it using Rust. I used the gc crate for garbage collection, and it works wonders. The value enum is particularly similar to your implementation, but replacing Arc<T> with Gc<T>, of course. Perhaps this can be an interesting implementation strategy for garbage collection in Hematita.