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

Re: Strange Static Analyzer Warning


  • Subject: Re: Strange Static Analyzer Warning
  • From: Steve Mills <email@hidden>
  • Date: Wed, 11 Dec 2013 10:52:40 -0600

On Dec 11, 2013, at 10:25:42, Keary Suska <email@hidden> wrote:

> I am getting a warning that I wasn't getting before, in Xcode 4.3.3 LLVM 3.1: "Potential leak of an object allocated on line 139", with two sub-warnings: 1) "Method returns an Objective-C object with a +1 retain count" (highlights kDMTabBarItemGradient), 2) "Object leaked: allocated object is not referenced later in this execution path and has a retain count of +1" (highlights "NSShadow *shadow" on line 142.
>
> In Xcode 5, I was able to get rid of the warning by inserting the explicit release of "shadow" (before it was autoreleased), but I can't seem to get Xcode 4.3 to do so. I tried relocating the shadow alloc/init before the save graphics state, and the release after the restore, but that didn't work. In all cases it trips on the gradient method call, which is odd, but it doesn't make any sense to me in any case...

I was able to compile everything but the kDMTabBarItemGradient line, so maybe it's doing something that causes a leak. You didn't provide that code. The rest of the code (well, everything inside the if() anyway) analyzes with no problems reported in Xcode 5.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255



_______________________________________________

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: 
 >Strange Static Analyzer Warning (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Strange Static Analyzer Warning
  • Next by Date: Re: Threaded drawing - JPEG
  • Previous by thread: Re: Strange Static Analyzer Warning
  • Next by thread: Cocoaheads 92630 will be meeting today, Wed, Dec 11 at 7pm
  • Index(es):
    • Date
    • Thread