Re: Static Analyzer Question
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