Ownership in Rust

Yehuda Katz:

  • In Rust, as in garbage collected languages, you never explicitly free memory
  • In Rust, unlike in garbage collected languages, you never explicitly close or release resources like files, sockets and locks
  • Rust achieves both of these features without runtime costs (garbage collection or reference counting), and without sacrificing safety.

This post contains a nice summary of Rust’s ownership model.