Re: Singletons cause static analyzer warning
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