mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-20 21:18:26 +02:00
455 B
455 B
Memory Management
Traditionally, languages have fallen into two broad categories:
- Full control via manual memory management: C, C++, Pascal, ...
- Full safety via automatic memory management at runtime: Java, Python, Go, Haskell, ...
Rust offers a new mix:
Full control and safety via compile time enforcement of correct memory management.
It does this with an explicit ownership concept.
First, let's refresh how memory management works.