• 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: Roland King <email@hidden>
  • Date: Wed, 30 Sep 2009 08:25:07 +0800

what's the name of the actual method it's complaining about?

Steve Cronin wrote:
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
_______________________________________________

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


References: 
 >Static Analyzer Question (From: Steve Cronin <email@hidden>)

  • Prev by Date: Re: Fast transition between two graphics
  • Next by Date: Re: Setting BorderThickness moves resize widget?!?
  • Previous by thread: Static Analyzer Question
  • Next by thread: Re: Static Analyzer Question
  • Index(es):
    • Date
    • Thread