Do we need to use __weak self inside UIAnimationBlocks in ARC?

This is not a retain cycle. A retain cycle would be

self -> block -> self

In this case we have

animation framework -> block
block -> self

where the first retain is only temporary – the block gets released when the animation ends. Even if a retain cycle happens, it will be only temporary and it won’t prevent object deallocation.

Leave a Comment