Comments

You must log in or register to comment.

2

froop wrote

Can someone explain this to an ignorant person?

0

365degrees wrote

Garbage collection is performed when a computer program actively tries to find unused memory and frees it. This works well enough for Haskell, Lisp, Lua (, Python, Go, D, Managed C++, any C users compiling with -lgc and many other languages.

However, it's just not good enough for Rust users. Instead they use reference counting which is deterministic but also piss poor substitute for a garbage collector scheme which doesn't handle circles made by references (A points to B, B points to A will never be freed), but the Rust book says that memory leaks are still "memory safe" even though it'll probably make memory allocation fail quicker.