3 ms·
In the event that it helps anyone, the following is how I think of Rust ownership stuff: 1. Ownership-based memory management is statically elided reference co
by frankmcsherry 7y ago
In the event that it helps anyone, the following is how I think of Rust ownership stuff:
1. Ownership-based memory management is statically elided reference counting.
2. Borrowing (shared and mutable) is statically elided reader-writer locks.
- deleted 7y ago[deleted]
- oconnor663 7y ago> Ownership-based memory management is statically elided reference counting. One difference I'd want to highlight here, which sometimes trips people up: Taking a reference to a Rust object has no effect on where that object's destructor runs. It can make the program fail to compile, if the reference lasts too long. But if the program keeps compiling, then the object's destructor is always running at the same place it was before.