• 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: How do I temporary retain self, under ARC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I temporary retain self, under ARC?


  • Subject: Re: How do I temporary retain self, under ARC?
  • From: Greg Parker <email@hidden>
  • Date: Thu, 17 Jul 2014 20:45:42 -0700

On Jul 17, 2014, at 8:40 PM, Roland King <email@hidden> 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     email@hidden     Runtime Wrangler



_______________________________________________

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: 
 >Re: How do I temporary retain self, under ARC? (From: Quincey Morris <email@hidden>)
 >Re: How do I temporary retain self, under ARC? (From: Roland King <email@hidden>)

  • Prev by Date: Re: How do I temporary retain self, under ARC?
  • Next by Date: Re: How do I temporary retain self, under ARC?
  • Previous by thread: Re: How do I temporary retain self, under ARC?
  • Next by thread: Re: How do I temporary retain self, under ARC?
  • Index(es):
    • Date
    • Thread