Memory ManagementBox, Rc, Arc & RefCell
All courses

When one owner isn't enough

Box<T> heap-allocates. Rc<T> reference-counts for single-thread sharing. Arc<T> is thread-safe Rc. RefCell<T> enables interior mutability (runtime borrow checks).

Choose wisely — each adds overhead and rules.

Output
Press Run to execute your code.