Hacker News new | ask | show | jobs
by nenreme 3637 days ago
Garbage collector frees objects when there are no more references to them. It thus does automatic memory management.

Borrow checker on the other hand doesn't alter lifetimes of objects, instead it doesn't allow you to keep references to things that were destroyed. I.e. it doesn't manage memory.

1 comments

Sure, but I was talking about Rust's ownership system which certainly does alter the lifetime of objects. Rust automatically frees objects when the owner scope ends.