It may be unclear to new Objective-C developers that referencing self in a block actually creates a 'strong reference cycle to self'. Because of the mechanics of ARC, Objective-C will prevent self from properly being deallocated, thus keeping it around indefinitely. Entire object graphs (UIViewControllers etc.) linger in memory this way and create memory leaks which accumulate over time. Needless to say, you will want to avoid this scenario at all cost.
Your new post is loading...