• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 > "Capturing 'self' strongly in this block is likely to lead to a retain cycle" (From: Andreas Grosam <email@hidden>)
 >Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle" (From: Fritz Anderson <email@hidden>)
 >Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle" (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: One more try - NSCollectionView multi-selection problem..
  • Next by Date: Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
  • Previous by thread: Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
  • Next by thread: Re: "Capturing 'self' strongly in this block is likely to lead to a retain cycle"
  • Index(es):
    • Date
    • Thread