2026-spring rust-ownership/lessons/02-ownership-who-frees-the-memory

README.md

Lesson 2: Ownership: who frees the memory

Ownership: who frees the memory comes up in almost every real Rust project. We start with the why, then write code together.

Full lesson: https://glibcode.net/courses/rust-ownership/lessons/2

Files

  • src/main.rs: moves: why the first String is gone

Run it

cargo run

Exercises

See exercises.md. Ask in the forum after you have tried.