Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

reference counting

Keeping a count of how many owners share a value and freeing it when the count reaches zero.

Rc keeps a strong count; Rc::clone increments it without copying the value, and dropping the last Rc frees the value. Arc is the atomic, thread-safe version.

Loading interactive…

Examples

  • After let notes = Rc::clone(&theme);, Rc::strong_count(&theme) is 2; drop(notes) brings it back to 1.

Read the full section →