• 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: Disabling auto-synthesis of property accessors.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling auto-synthesis of property accessors.


  • Subject: Re: Disabling auto-synthesis of property accessors.
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 27 May 2015 08:37:56 -0400

On May 27, 2015, at 6:08 AM, Uli Kusterer wrote:

> On 26 May 2015, at 19:24, Alex Zavatone <email@hidden> wrote:
>> For any nonmutable class, should I be using copy instead of strong or is this just with NSString?
>
> You should consider that pattern for every class for which a mutable version exists that is a subclass of the non-mutable base class (because only in that case could someone assign a mutable object to your un-mutable property), and which implements NSCopying. For Foundation and other Apple classes that considering should lead to using copy.

For those of us who have not yet had the coffee jump start their brain cell, could you possibly reword that so it's a little less obtuse?

No offense intended, that sentence just sends my brain cell off in too many directions.


> For other frameworks you should probably look at their code to make sure they work the same way as Apple's. If they don’t use the retain optimization, you’ll want to verify that it performs within your constraints (by profiling) and if they don’t, maybe add this optimization.

Thanks much,
Alex Zavatone
_______________________________________________

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: Disabling auto-synthesis of property accessors.
      • From: Dave <email@hidden>
    • Re: Disabling auto-synthesis of property accessors.
      • From: Dave <email@hidden>
References: 
 >Disabling auto-synthesis of property accessors. (From: Alex Zavatone <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Kyle Sluder <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Fritz Anderson <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Quincey Morris <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Uli Kusterer <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Alex Zavatone <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Alex Zavatone <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Fritz Anderson <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Alex Zavatone <email@hidden>)
 >Re: Disabling auto-synthesis of property accessors. (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Disabling auto-synthesis of property accessors.
  • Next by Date: Re: Disabling auto-synthesis of property accessors.
  • Previous by thread: Re: Disabling auto-synthesis of property accessors.
  • Next by thread: Re: Disabling auto-synthesis of property accessors.
  • Index(es):
    • Date
    • Thread