Re: capturing self is likely to lead to a retain cycle ..

2011-11-15 Thread Matt Neuburg
This is *very* well explained in the WWDC 2011 video on Objective-C advances. m. On Sat, 12 Nov 2011 16:14:31 +0800, Roland King r...@rols.org said: With the code below I'm getting a warning Automatic Reference Counting Issue: Capturing 'self' strongly in this block is likely to lead to a

capturing self is likely to lead to a retain cycle ..

2011-11-12 Thread Roland King
I have a UIViewController which is presented modally, it has a textfield which allows editing and a model object, call it foo, on which it can attempt to set the 'topicName' property. Because I'm dealing with UIDocument(s) and trying to be nicely iCloud compatible and the topic name change does

Re: capturing self is likely to lead to a retain cycle ..

2011-11-12 Thread Jeff Kelley
ARC doesn’t know in the context of that method what will happen to the block. Each method lives in a vacuum with retain counts being consistent at the beginning and end. So, even though you know that the block will be released, that’s not clear in the context of the method. I would recommend the