• 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: Objective-C Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C Question


  • Subject: Re: Objective-C Question
  • From: Graham Cox <email@hidden>
  • Date: Wed, 13 Mar 2013 08:34:33 +1100

On 13/03/2013, at 6:53 AM, Dave <email@hidden> wrote:

> If that is the case, then how do you signal to the compiler/analyzer that you are returning a retained object?

In general you shouldn't return a retained object (unless it's temporarily retained and will be autoreleased of course). If you are routinely doing this then your design is flawed. The reason it's hard to signal to the compiler that you're returning a retained object is that you shouldn't be doing it. When you have to do it, use the word 'new' in the method.

> Unless there is another prefix to use, they I am going to continue ignore it too!

Again, no offence intended but when a person doesn't follow a rule because they think it doesn't apply to them, it's just a sign of inexperience and/or lack of understanding. Sorry, but there it is.

--Graham



_______________________________________________

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: Objective-C Question
      • From: Dave <email@hidden>
References: 
 >Objective-C Question (From: Dave <email@hidden>)
 >Re: Objective-C Question (From: Mike Abdullah <email@hidden>)
 >Re: Objective-C Question (From: Dave <email@hidden>)
 >Re: Objective-C Question (From: John McCall <email@hidden>)
 >Re: Objective-C Question (From: Dave <email@hidden>)
 >Re: Objective-C Question (From: John McCall <email@hidden>)
 >Re: Objective-C Question (From: Dave <email@hidden>)
 >Re: Objective-C Question (From: John McCall <email@hidden>)
 >Re: Objective-C Question (From: Jens Alfke <email@hidden>)
 >Re: Objective-C Question (From: Dave <email@hidden>)
 >Re: Objective-C Question (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Objective-C Question (From: Dave <email@hidden>)

  • Prev by Date: Re: Objective-C Question
  • Next by Date: Re: Another Gnarly Objective-C Question!
  • Previous by thread: Re: Objective-C Question
  • Next by thread: Re: Objective-C Question
  • Index(es):
    • Date
    • Thread