• 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: Impossible leak warning in OS X init method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Impossible leak warning in OS X init method


  • Subject: Re: Impossible leak warning in OS X init method
  • From: Bill Cheeseman <email@hidden>
  • Date: Sun, 30 Aug 2015 06:32:21 -0400

> On Aug 29, 2015, at 6:18 PM, Marek Hrušovský <email@hidden> wrote:
>
> Aren't you calling a function "do_stuff_successfully" in your initializer?
> Maybe you named your method/function with special prefix like "new", "create", "alloc"

No, that term was abstracted to state the problem in its simplest form. The actual test was 'if (uiElementRef != NULL)', so the issue was not triggered by accidentally naming a function in a way that might confuse the compiler. The warning path in the static analyzer skips that branch and goes to the false branch where I marked the error.

The code I posted is highly simplified from the original, which may appear here if the administrator approves my long message. Jens has looked at the original code and doesn't see an error.

There is a lot of Core Foundation code in the original. Is anybody aware of circumstances where Core Foundation confuses the static analyzer?

--

Bill Cheeseman - 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: 
 >Impossible leak warning in OS X init method (From: Bill Cheeseman <email@hidden>)
 >Re: Impossible leak warning in OS X init method (From: Jens Alfke <email@hidden>)
 >Re: Impossible leak warning in OS X init method (From: Bill Cheeseman <email@hidden>)
 >Re: Impossible leak warning in OS X init method (From: Marek Hrušovský <email@hidden>)

  • Prev by Date: Re: Swift struggles with arithmetic ?
  • Next by Date: Autolayout requiring NSDisableScreenUpdates
  • Previous by thread: Re: Impossible leak warning in OS X init method
  • Next by thread: Autolayout requiring NSDisableScreenUpdates
  • Index(es):
    • Date
    • Thread