Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
- Subject: Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
- From: Chris Suter <email@hidden>
- Date: Wed, 14 Dec 2011 19:30:05 +1100
Hi Jens/Jerry,
On Wed, Dec 14, 2011 at 5:42 PM, Jens Alfke <email@hidden> wrote:
> Rename your methods to use the standard naming conventions, I think.
The best approach in my opinion because this also fixes any confusion
that other developers reading the code might have.
> Although I vaguely remember reading about some way to flag a method
> declaration to tell the compiler that it’s a copier (maybe a special
> __attribute type?)
A not so good approach, but yes, you can annotate your code. See:
<http://clang-analyzer.llvm.org/annotations.html>
If you’re using the 10.7 SDK, you will want to use the macros defined
in NSObjCRuntime.h, (specifically, NS_RETURNS_NOT_RETAINED).
Kind regards,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden