1
0
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:
Dominik Maier 2023-07-18 17:51:52 +02:00 committed by GitHub
parent cb45d322c7
commit 486458c72d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.