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 <[email protected]> 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 retain cycle" > > >-(BOOL)textFieldShouldReturn:(UITextField*)textField >{ > [ foo setTopicName:[ textField text ] completionHandler:^(BOOL)success{ > > if( !success ) > { > // present an alert sheet > } > else > { > // onCancel is also the callback from the 'cancel' > button and dismissed this modally presented viewcontroller > [ self onCancel:nil ]; // <-- ARC not too happy with > this > } > } ]; >} > > -- matt neuburg, phd = [email protected], <http://www.apeth.net/matt/> A fool + a tool + an autorelease pool = cool! Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
