Singletons cause static analyzer warning
Singletons cause static analyzer warning
- Subject: Singletons cause static analyzer warning
- From: Sidney San MartÃn <email@hidden>
- Date: Thu, 10 Sep 2009 15:49:43 -0400
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