Tag

NSString

0 views collected around this technical thread.

Kuaishou Frontend Engineering
Kuaishou Frontend Engineering
Aug 30, 2021 · Mobile Development

Why Does NSString Leak in Long‑Running Threads? Exploring ARC and AutoreleasePool

An in‑depth analysis of a memory‑growth issue observed in a Kuaishou live‑stream app reveals how ARC, autorelease pools, and NSString’s class‑cluster implementation interact, why @autoreleasepool blocks resolve the leak, and how compiler optimizations and thread‑local pools affect object release in long‑running C++ threads.

ARCAutoreleasePoolMemory Management
0 likes · 23 min read
Why Does NSString Leak in Long‑Running Threads? Exploring ARC and AutoreleasePool