1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-18 20:39:35 +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.
* Destructor delays.
* Scope-based like C++:
* Complex, opt-in by programmer.
* Potential for use-after-free.
* Complex, opt-in by programmer (on C++).
* Circular references can lead to memory leaks
* Potential runtime overhead
* Compiler-enforced and scope-based like Rust:
* Some upfront complexity.
* Can reject valid programs.