mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-23 15:14:35 +02:00
16 lines
455 B
Markdown
16 lines
455 B
Markdown
|
# 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.
|