Static Analyzer Question
Static Analyzer Question
- Subject: Static Analyzer Question
- From: Steve Cronin <email@hidden>
- Date: Tue, 29 Sep 2009 19:12:56 -0500
Folks;
I have a Clang issue that is making me a little crazy.
I have a modestly complex Core Data application with several thousand
lines of code.
I've run Clang and at this point I have only one issue:
"…. Object with +0 retain counts returned to caller where a +1
(owning) retain count is expected"
this is shown at the end of a particular method.
The deal is that, over time, I have isolated this method and at this
moment there are NO methods which call it.
I cannot leave it like this - this isolation is a result of honing in
on the Clang issue...
A very common pattern for my application looks like this:
+ (NSString *) fooBar {
NSString *result = @"";
…..
if (x) {
result = @"1";
...
} else {
result = @"2";
}
return result;
}
Yes this is a class method - I use this pattern for both class and
instance methods.
This is the only method that Clang has an issue with…
Why does Clang believe that an 'owning retain count is expected' if
the method is never called?
Why is Clang picking on this one method which mirrors the mechanics of
so many others?
Any thoughts appreciated!
Steve
_______________________________________________
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