mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-22 07:47:44 +02:00
Add speaker notes for rc.md
This commit is contained in:
parent
5256d9c3fd
commit
dd194f07c9
@ -22,3 +22,11 @@ context.
|
|||||||
[1]: https://doc.rust-lang.org/std/rc/struct.Rc.html
|
[1]: https://doc.rust-lang.org/std/rc/struct.Rc.html
|
||||||
[2]: https://doc.rust-lang.org/std/cell/index.html
|
[2]: https://doc.rust-lang.org/std/cell/index.html
|
||||||
[3]: ../concurrency/shared_state/arc.md
|
[3]: ../concurrency/shared_state/arc.md
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
* Like C++'s `std::shared_ptr`.
|
||||||
|
* `clone` is cheap: creates a pointer to the same allocation and increases the reference count.
|
||||||
|
* `make_mut` actually clones the inner value if necessary ("clone-on-write") and returns a mutable reference.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user