• 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: Retain/Release and Properties clarification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Retain/Release and Properties clarification


  • Subject: Re: Retain/Release and Properties clarification
  • From: David Duncan <email@hidden>
  • Date: Wed, 12 Oct 2011 09:46:54 -0700

On Oct 12, 2011, at 9:21 AM, Bayes Scott F wrote:

> Someone on Matt's site mentioned the possibility that the synthesized ivar could be implemented indirectly, say as a member of a collection. Since the implementation's opaque, we don't know if that ever can happen.

I can't say that I know what could be done, thats something the compiler guys would have to figure out :).

> And does the compiler ever shortcut something like self.mySynthSimpleIntVar to self->mySynthSimpleIntVar, or does it always use the setter/getter?


Due to the nature of C and Obj-C, the compiler can never safely short circuit the message send. From C's point of view this is due to the compiler seeing an opaque implementation of objc_msgSend*() where you see the accessor, as such the C compiler cannot inline the function. From an Obj-C point of view, the primary issue is that the compiler doesn't actually know for certain that other code in your application or the frameworks it links against haven't changed the implementation of your accessor and thus require it to be called for correct operation.
--
David Duncan

_______________________________________________

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: Retain/Release and Properties clarification
      • From: Bayes Scott F <email@hidden>
References: 
 >Re: Retain/Release and Properties clarification (From: Matt Neuburg <email@hidden>)
 >Re: Retain/Release and Properties clarification (From: David Duncan <email@hidden>)
 >Re: Retain/Release and Properties clarification (From: Bayes Scott F <email@hidden>)

  • Prev by Date: Re: drawRect not being called by NSCollectionView..
  • Next by Date: Re: AVFoundation and kYUVSPixelFormat from AVPlayer
  • Previous by thread: Re: Retain/Release and Properties clarification
  • Next by thread: Re: Retain/Release and Properties clarification
  • Index(es):
    • Date
    • Thread