Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage Collection #1

Open
gahag opened this issue Aug 29, 2021 · 2 comments
Open

Garbage Collection #1

gahag opened this issue Aug 29, 2021 · 2 comments
Labels
help wanted Extra attention is needed Type - Feature A proposal for a new feature.

Comments

@gahag
Copy link

gahag commented Aug 29, 2021

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?

@danii
Copy link
Owner

danii commented Aug 31, 2021

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 danii added help wanted Extra attention is needed Type - Feature A proposal for a new feature. labels Aug 31, 2021
@gahag
Copy link
Author

gahag commented Sep 1, 2021

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 with Gc, of course. Perhaps this can be an interesting implementation strategy for garbage collection in Hematita.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Type - Feature A proposal for a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants