Adding more information about the behavior of Arc/Rc

when you perform a clone() call.
This commit is contained in:
Adenilson Cavalcanti 2015-03-26 12:05:21 -07:00
parent 557d4346a2
commit 7d3bf47323
2 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,9 @@ use heap::deallocate;
/// With simple pipes, without `Arc`, a copy would have to be made for each
/// task.
///
/// When you clone an `Arc<T>`, it will create another pointer to the data and
/// increase the reference counter.
///
/// ```
/// # #![feature(alloc, core)]
/// use std::sync::Arc;

View File

@ -431,7 +431,8 @@ impl<T> Clone for Rc<T> {
/// Makes a clone of the `Rc<T>`.
///
/// This increases the strong reference count.
/// When you clone an `Rc<T>`, it will create another pointer to the data and
/// increase the strong reference counter.
///
/// # Examples
///