Back to Rust Lang

Ownership

redirects/ownership.md

latest719 B
Original Source

% Ownership

<small>There is a new edition of the book and this is an old link.</small>

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: