On 30 Sep 2009, at 09:13, Greg Parker <[email protected]> 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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to