• 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: LLVM : spurious memory-mgmt warnings with "Copy" methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >LLVM : spurious memory-mgmt warnings with "Copy" methods (From: Jerry Krinock <email@hidden>)
 >Re: LLVM : spurious memory-mgmt warnings with "Copy" methods (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
  • Next by Date: Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
  • Previous by thread: Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
  • Next by thread: Re: LLVM : spurious memory-mgmt warnings with "Copy" methods
  • Index(es):
    • Date
    • Thread