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

Merge pull request from andrewpollack/patch-8

Minor punctuation update
This commit is contained in:
Martin Geisler 2022-12-22 10:05:08 +01:00 committed by GitHub
commit ed0a11a86b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,31 +4,31 @@ Here is a rough comparison of the memory management techniques.
## Pros of Different Memory Management Techniques
* Manual like C
* No runtime overhead
* Automatic like Java
* Fully automatic
* Safe and correct
* Scope-based like C++
* Partially automatic
* No runtime overhead
* Compiler-enforced scope-based like Rust
* Enforced by compiler
* No runtime overhead
* Safe and correct
* Manual like C:
* No runtime overhead.
* Automatic like Java:
* Fully automatic.
* Safe and correct.
* Scope-based like C++:
* Partially automatic.
* No runtime overhead.
* Compiler-enforced scope-based like Rust:
* Enforced by compiler.
* No runtime overhead.
* Safe and correct.
## Cons of Different Memory Management Techniques
* Manual like C:
* Use-after-free
* Double-frees
* Memory leaks
* Automatic like Java
* Garbage collection pauses
* Destructors delays
* Scope-based like C++
* Complex, opt-in by programmer
* Potential for use-after-free
* Compiler-enforced and scope-based like Rust
* Some upfront complexity
* Can reject valid programs
* Use-after-free.
* Double-frees.
* Memory leaks.
* Automatic like Java:
* Garbage collection pauses.
* Destructors delays.
* Scope-based like C++:
* Complex, opt-in by programmer.
* Potential for use-after-free.
* Compiler-enforced and scope-based like Rust:
* Some upfront complexity.
* Can reject valid programs.