Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/std/rc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ When multiple ownership is needed, `Rc`(Reference Counting) can be used. `Rc` ke

Reference count of an `Rc` increases by 1 whenever an `Rc` is cloned, and decreases by 1 whenever one cloned `Rc` is dropped out of the scope. When an `Rc`'s reference count becomes zero, which means there are no owners remained, both the `Rc` and the value are all dropped.

Cloning an `Rc` never do a deep copy. Cloning creates just another pointer to the wrapped value, and increments the count.
Cloning an `Rc` never performs a deep copy. Cloning creates just another pointer to the wrapped value, and increments the count.

```rust,editable
use std::rc::Rc;
Expand Down