mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-26 09:12:58 +02:00
Memory Management: Rework Scope-based Cons (#998)
* Memory Management: Add classic ARC issues to Comparison * replaced uaf reference (which needs misuse in C++)
This commit is contained in:
parent
cb45d322c7
commit
486458c72d
@ -27,8 +27,9 @@ Here is a rough comparison of the memory management techniques.
|
|||||||
* Garbage collection pauses.
|
* Garbage collection pauses.
|
||||||
* Destructor delays.
|
* Destructor delays.
|
||||||
* Scope-based like C++:
|
* Scope-based like C++:
|
||||||
* Complex, opt-in by programmer.
|
* Complex, opt-in by programmer (on C++).
|
||||||
* Potential for use-after-free.
|
* Circular references can lead to memory leaks
|
||||||
|
* Potential runtime overhead
|
||||||
* Compiler-enforced and scope-based like Rust:
|
* Compiler-enforced and scope-based like Rust:
|
||||||
* Some upfront complexity.
|
* Some upfront complexity.
|
||||||
* Can reject valid programs.
|
* Can reject valid programs.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user