Glossary coding Term Page

Weak<T>

A non-owning reference that prevents reference cycles

weak #rust#memory#rc
Korean version

Aliases

Weakweak reference

Prerequisites

Related Concepts

Core Idea

[[weak|Weak<T>]] is the weak reference pointer that points into shared structures without increasing the strong reference count. That makes it important for parent-child graphs and other shapes where full ownership cycles would leak memory.

Why It Matters Here

Mathbong uses Weak when explaining Rc<T> cycles and graph-like structures. The key idea is simple: keep an access path without claiming ownership.

Posts Mentioning This Concept