• 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: There's obviously something I don't understand about autorelease.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: There's obviously something I don't understand about autorelease.


  • Subject: Re: There's obviously something I don't understand about autorelease.
  • From: Roland King <email@hidden>
  • Date: Sun, 18 Mar 2012 11:50:30 +0800

On Mar 18, 2012, at 10:35 AM, Quincey Morris wrote:

> On Mar 17, 2012, at 18:59 , Roland King wrote:
>
>> I will just need to be more diligent checking ivars against the properties they support to ensure they match
>
> Clang *was* checking this, at least in Xcode 4.2.
>
> We had a thread a couple of months ago discussing this, in a case where the check was over-zealous. Clang would produce a warning for '@synthesize foo' if the property was declared '@property (readonly)', and required you to declare it as '@property (readonly, strong)' to avoid the warning.
>
> I mention this because Xcode 4.3's clang doesn't complain about this any more.
>
> Also, note that 'weak' and 'strong' etc really shouldn't be on @property either, since they only affect the way the ivar is handled. The property itself is neither weak nor strong.
>
> The justification given for leaving them on @property was that the complication of attributes on @synthesize seemed undesirable, and that @synthesize is headed the way of the dodo anyway.
>

Did it really? I never saw that, are you talking about the static analyzer? Clang always errored if you synthesize a property with the wrong type of backing variable, still does that. My case was more subtle, I had my own setter and getter and the underlying ivar was strong where the property was weak. I know of nothing which catches that mistake, the analyzer doesn't and I appreciate Greg Parker's suggestion that I file an enhancement request for that, seems like something it could do which would be useful.

_______________________________________________

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: There's obviously something I don't understand about autorelease.
      • From: Quincey Morris <email@hidden>
References: 
 >Re: There's obviously something I don't understand about autorelease. (From: G S <email@hidden>)
 >Re: There's obviously something I don't understand about autorelease. (From: Roland King <email@hidden>)
 >Re: There's obviously something I don't understand about autorelease. (From: Richard Somers <email@hidden>)
 >Re: There's obviously something I don't understand about autorelease. (From: Roland King <email@hidden>)
 >Re: There's obviously something I don't understand about autorelease. (From: Greg Parker <email@hidden>)
 >Re: There's obviously something I don't understand about autorelease. (From: Roland King <email@hidden>)
 >Re: There's obviously something I don't understand about autorelease. (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: There's obviously something I don't understand about autorelease.
  • Next by Date: Re: There's obviously something I don't understand about autorelease.
  • Previous by thread: Re: There's obviously something I don't understand about autorelease.
  • Next by thread: Re: There's obviously something I don't understand about autorelease.
  • Index(es):
    • Date
    • Thread