Debugging Objective-C reference cycles

from blog lmno.lol @alvaro, | ↗ original
Overriding retain/release/autorelease may be handy while debugging: - (instancetype)retain { NSLog(@"%p, retain\n", self); return [super retain]; } - (oneway void)release { NSLog(@"%p, release\n", self); [super release]; } - (instancetype)autorelease { NSLog(@"%p, autorelease\n", self); return [super autorelease]; }