DEV Community

Discussion on: Programming Concepts: Garbage Collection

Collapse
 
legolord208 profile image
jD91mZM2

Garbage collection is exactly why Rust is so cool. It does not have one. Instead, it keeps close track on every variable, and frees it when it completely goes out of scope. And dangling pointers are no problem, since they have references and lifetimes.

Basically Rust has the simple to use and efficient alternative to a garbage collector.