• 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: Possible leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible leak?


  • Subject: Re: Possible leak?
  • From: Ken Ferry <email@hidden>
  • Date: Wed, 10 Mar 2010 13:17:59 -0800

File a bug with the static analyzer that it should not do this.  :-)  I'm
not sure what's wrong here, because clang already knows about assert, unless
you redefined the macro.

See <http://clang-analyzer.llvm.org/annotations.html#custom_assertions>.

-Ken

On Wed, Mar 10, 2010 at 12:09 PM, Laurent Daudelin <
email@hidden> wrote:

> Just ran the build analyzer on my code and the analyzer flagged this as a
> possible leak:
>
>    host = CFHostCreateWithName(kCFAllocatorDefault, (CFStringRef)hostName);
>    assert(host != NULL);
>
> saying that on the "assert(host != NULL)" line, there was a potential leak
> of the object allocated just above. How would one deal with that?
>
> -Laurent.
> --
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin
> http://nemesys.dyndns.org
> Logiciels Nemesys Software
> email@hidden
> Photo Gallery Store:
> http://laurentdaudelin.shutterbugstorefront.com/g/galleries
>
> _______________________________________________
>
> 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

  • Follow-Ups:
    • Re: Possible leak?
      • From: Laurent Daudelin <email@hidden>
References: 
 >Possible leak? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: CAKeyframeAnimation and NSView frame property
  • Next by Date: Re: Possible leak?
  • Previous by thread: Possible leak?
  • Next by thread: Re: Possible leak?
  • Index(es):
    • Date
    • Thread