Skip to content

Commit 696cba6

Browse files
committed
the exampleis about drop, not (de)allocation
1 parent 868a772 commit 696cba6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liballoc/rc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@
112112
//!
113113
//! // Despite dropping `gadget_owner`, we're still able to print out the name
114114
//! // of the `Owner` of the `Gadget`s. This is because we've only dropped a
115-
//! // single `Rc<Owner>`, not the `Owner` allocation it points to. As long as there are
115+
//! // single `Rc<Owner>`, not the `Owner` it points to. As long as there are
116116
//! // other `Rc<Owner>` pointing at the same `Owner` allocation, it will remain
117-
//! // allocated. The field projection `gadget1.owner.name` works because
117+
//! // live. The field projection `gadget1.owner.name` works because
118118
//! // `Rc<Owner>` automatically dereferences to `Owner`.
119119
//! println!("Gadget {} owned by {}", gadget1.id, gadget1.owner.name);
120120
//! println!("Gadget {} owned by {}", gadget2.id, gadget2.owner.name);

0 commit comments

Comments
 (0)