Re: __block __weak - am I doing this right?
Re: __block __weak - am I doing this right?
- Subject: Re: __block __weak - am I doing this right?
- From: steven Hooley <email@hidden>
- Date: Sat, 18 Feb 2012 13:41:17 +0000
> The same issue came up again later the same day:
>
> __block UIBackgroundTaskIdentifier bti = [[UIApplication sharedApplication]
> beginBackgroundTaskWithExpirationHandler: ^{
> [[UIApplication sharedApplication] endBackgroundTask:bti];
> }];
>
> Without __block, bti is invalid, and you won't find that out easily because it's unlikely that you'll actually expire. :) m.
Can this be right?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden