Rc and Arc Smart Pointers
Rc<T> and Arc<T> give shared ownership by keeping a strong count alongside the heap value; the value is freed when the count hits zero. Rc uses plain integer counts and is single-threaded only; Arc uses atomic operations, paying a small cost for cross-thread sharing.
This Concept is waiting for its first lesson!
Rc<T> and Arc<T> give shared ownership by keeping a strong count alongside the heap value; the value is freed when the count hits zero. Rc uses plain integer counts and is single-threaded only; Arc uses atomic operations, paying a small cost for cross-thread sharing.
Are you a teacher? Sign in to start contributing.
Sign In