]> git.lizzy.rs Git - rust.git/commitdiff
the exampleis about drop, not (de)allocation
authorRalf Jung <post@ralfj.de>
Sat, 19 Oct 2019 08:14:10 +0000 (10:14 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 19 Oct 2019 08:14:10 +0000 (10:14 +0200)
src/liballoc/rc.rs

index 1cab8026514ea4cc93e31f05926f07458ef88d2a..205f0d7b408561404492ccda5e46a9138b5b7218 100644 (file)
 //!
 //!     // Despite dropping `gadget_owner`, we're still able to print out the name
 //!     // of the `Owner` of the `Gadget`s. This is because we've only dropped a
-//!     // single `Rc<Owner>`, not the `Owner` allocation it points to. As long as there are
+//!     // single `Rc<Owner>`, not the `Owner` it points to. As long as there are
 //!     // other `Rc<Owner>` pointing at the same `Owner` allocation, it will remain
-//!     // allocated. The field projection `gadget1.owner.name` works because
+//!     // live. The field projection `gadget1.owner.name` works because
 //!     // `Rc<Owner>` automatically dereferences to `Owner`.
 //!     println!("Gadget {} owned by {}", gadget1.id, gadget1.owner.name);
 //!     println!("Gadget {} owned by {}", gadget2.id, gadget2.owner.name);