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

Re: Static Analyzer Question


  • Subject: Re: Static Analyzer Question
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 30 Sep 2009 15:18:28 +0700


On 30 Sep 2009, at 09:13, Greg Parker <email@hidden> wrote:

The static analyzer tries to enforce Cocoa's memory management
convention, where the retain-edness of the return value depends on the
name of the method. By that convention, if the method name contains
"new" or "copy" or "alloc" then the return value is retained and the
caller is expected to release it; otherwise the return value is
autoreleased and the caller is not expected to release it.

I had a similar problem with the static analyzer:

+(NSSet *)keyPathsForValuesAffectingCanCopyRsrcFork

There is a "Copy" in the name of the method, but the real name (as should be considered by clang) is:
+keyPathsForValuesAffecting<Key>


The "copy" is just part of the <Key>. This is a bit confusing. Maybe Clang should be told about method names which contain a <Key> in it's name.

Kind regards,

Gerriet.

_______________________________________________

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


  • Prev by Date: Does Core Data have reserved Entity names?
  • Next by Date: Re: Nib Loading Crash on Tiger only -- SOLVED (well made gone...)
  • Previous by thread: Re: Static Analyzer Question
  • Next by thread: Don't understand NSBrowser's setReusesColumns:
  • Index(es):
    • Date
    • Thread