Glossary coding Term Page

Rc<T>

A single-threaded shared-ownership reference-counted pointer

rc #rust#ownership#memory
Korean version

Aliases

Reference CountedRc

Prerequisites

Related Concepts

Core Idea

[[rc|Rc<T>]] is the single-threaded reference-counted pointer for shared read-only ownership of one heap value. Rc::clone does not copy the data itself; it only increments the reference count so several owners can hold the same value.

Why It Matters Here

Mathbong uses Rc for GUI-like trees, graph structures, shared configuration, and contrasts with Arc<T>. The defining constraint is simple: shared ownership is allowed, but only inside one thread.

Posts Mentioning This Concept