1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-23 15:14:35 +02:00
comprehensive-rust/src/memory-management.md

16 lines
455 B
Markdown
Raw Normal View History

2022-12-21 16:36:30 +01:00
# 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.