Tuesday, July 31, 2012 [Tweets]

Notification Gotchas

Mark Dalrymple:

Notice that self is explicitly referenced inside of the block. self can also be referenced implicitly by accessing an instance variable. By default, blocks capture variables read-only, and objects are retained. Therefore self is retained, and we’re in a retain cycle situation.

That API was simpler with garbage collection.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment