Hi,

> So, when myController is nil'ed out, ARC releases it, and it releases
> the block in turn.  No leaks/abandoned memory.
> 
> A special form of this is the idiom:
> 
> __block id mySelf = self;
> 
> ^{
>   [mySelf doSomething];
> }

Wouldn't using __weak instead of __block be better and clearer in the above 
context?

Thanks,
Abdul


> 
> This lets you use self in a block without retaining it.
> 
> -- 
> Conrad Shultz
> 
> Synthetiq Solutions
> www.synthetiqsolutions.com
> _______________________________________________
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/asowayan%40vectorworks.net
> 
> This email sent to [email protected]

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to