On Jul 17, 2014, at 8:40 PM, Roland King <r...@rols.org> wrote:
> Using the objc_precise_lifetime attribute ensures the object stays alice to 
> the end of the block. 
> 
> I think that's a bit better than abusing retain release. 

I'm not sure if that is reliable. It's possible that the optimizer sees that 
the lifetime of the objc_precise_lifetime variable is strictly contained within 
the lifetime of `self`. The compiler "knows" `self` is alive, so it might 
decide it can omit any retains and releases from the objc_precise_lifetime 
variable.


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to