Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
- Subject: Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
- From: Fritz Anderson <email@hidden>
- Date: Tue, 10 Jul 2012 09:16:19 -0500
On 9 Jul 2012, at 6:35 PM, Shane Stanley wrote:
> On 10/07/2012, at 2:03 AM, Fritz Anderson wrote:
>
>> In practice, NSOperationQueue probably releases the block when it's done with it
>
> I'm curious about your use of the word "probably" here. Can you explain?
The documentation for -addOperationWithBlock: does not _explicitly_ say that blocks are released after they are executed, so I didn't say so for a fact.
But doing so is the only thing that makes sense, and conforms to the design pattern that containers retain (copy)/release the objects they contain. So the release is at least probable, if not certain.
— F
_______________________________________________
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