Skip to content

WeakPtr: weak-pointer design, learned from Chromium

This directory implements a Chromium-style WeakPtr component and works through the modern C++ design of observing whether an object is still alive, without taking ownership. It sits alongside the OnceCallback series — the industrial-strength answer to the hand-rolled cancellation token from 01-4 is WeakPtr.

Full tutorial (full/)

For readers starting fresh, from weak-reference concepts and prerequisites through to a complete implementation.

Prerequisites (7 chapters):

Hands-on (6 chapters):

Hands-on design guide (hands_on/)

For readers comfortable with C++ templates and concurrency, a quick walkthrough of the design motivation, implementation, and testing:

v0.10.0-6-gbcee94e · bcee94e · 2026-08-20