• 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: Singletons cause static analyzer warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Singletons cause static analyzer warning


  • Subject: Re: Singletons cause static analyzer warning
  • From: Alexander von Below <email@hidden>
  • Date: Thu, 10 Sep 2009 21:54:37 +0200

Hello Sidney,

yes, the analyzer is not always right.

And I would also like to know how I can placete the areas where it errs

Alex

Am 10.09.2009 um 21:49 schrieb Sidney San Martín:

If I implement a singleton as described in the docs
(<http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32 >),
Xcode 3.2's static analyzer throws a warning:


MyGizmoClass.m:19:13: warning: Potential leak of an object allocated on line 19
[[self alloc] init]; // assignment not done here
^


Is the analyzer behaving correctly here? How can I placate it?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Singletons cause static analyzer warning (From: Sidney San Martín <email@hidden>)

  • Prev by Date: Singletons cause static analyzer warning
  • Next by Date: Re: Singletons cause static analyzer warning
  • Previous by thread: Singletons cause static analyzer warning
  • Next by thread: Re: Singletons cause static analyzer warning
  • Index(es):
    • Date
    • Thread