Re: Objective-C Question
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