• 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
ARC, blocks, capture variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ARC, blocks, capture variables


  • Subject: ARC, blocks, capture variables
  • From: Scott Ribe <email@hidden>
  • Date: Sun, 27 Sep 2015 18:17:39 -0600

Given a block instance var named fun:

fun = ^void () {[self ...];};

Results in the warning:

"Capturing 'self' strongly in this block is likely to lead to a retain cycle"

But I know that it does not result in a retain cycle, because I nil out fun at the appropriate time. So how to get rid of the warning?

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice






_______________________________________________

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


  • Follow-Ups:
    • Re: ARC, blocks, capture variables
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: -[NSThread start] blocks ?!?
  • Next by Date: Re: o Swift generics, y no can I haz u dispatch correctly?
  • Previous by thread: Re: o Swift generics, y no can I haz u dispatch correctly?
  • Next by thread: Re: ARC, blocks, capture variables
  • Index(es):
    • Date
    • Thread