hematita icon indicating copy to clipboard operation
hematita copied to clipboard

Garbage Collection

Open gahag opened this issue 2 years ago • 2 comments

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?

gahag avatar Aug 29 '21 15:08 gahag

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.

danii avatar Aug 31 '21 19:08 danii

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.

gahag avatar Sep 01 '21 03:09 gahag