Ask HN: When should I worry about implementing a garbage collector?
Also, as a side note, what are some good, free resources to learn more about compiler implementations?
Also, as a side note, what are some good, free resources to learn more about compiler implementations?
A simple stop-the-world mark and sweep GC without any generations should be relatively easy to implement. https://blogs.msdn.microsoft.com/abhinaba/2009/01/30/back-to...
Does it has ownership like rust? does it have explicit allocation and dealocation like C/C++? Does it have automatic memory management like Java/Python/Javascipt?
Good garbage collectors are difficult to implement and it's probably too much for an initial project. You can probably use Rc or Arc and hope nobody makes too many cycles before there is an official package in rust for a garbage collector. https://www.rust-lang.org/en-US/faq.html#is-rust-garbage-col...
As the other comment says, in C you can use the Boehm garbage collector. I don't know if there is something similar for rust.