Tuesday, July 31, 2012

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 RSS · Twitter

Leave a Comment