Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 720 Bytes

ownership.md

File metadata and controls

20 lines (13 loc) · 720 Bytes

% Ownership

There is a new edition of the book and this is an old link.

Ownership is Rust’s most unique feature, and it enables Rust to make memory safety guarantees without needing a garbage collector.

  1. Each value in Rust has a variable that’s called its owner.
  2. There can only be one owner at a time.
  3. When the owner goes out of scope, the value will be dropped.

Here are the relevant sections in the new and old books: