Tag

C++ templates

1 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Jun 30, 2022 · Mobile Development

Understanding the Implementation of weak Pointers in the Objective‑C Runtime

This article explains how Objective‑C implements weak pointers using a hash‑based weak table, SideTables, ExplicitInit, and various low‑level C++ template functions such as storeWeak, weak_register_no_lock, and weak_clear_no_lock to ensure automatic nil‑assignment and safe deallocation.

C++ templatesObjective-Cmemory management
0 likes · 19 min read
Understanding the Implementation of weak Pointers in the Objective‑C Runtime