On or about 7/7/10 11:17 AM, thus spake "Bill Bumgarner" <[email protected]>:

> I missed the OP's post....
> 
> If the static analyzer is barfing up a false positive, please report it
> (http://bugreport.apple.com/ works fine).

Is that generally true? I mean, first of all, false positives are a
well-known phenomenon with this static analyzer (the Web page at llvm.org
talks about this). Second, they do no harm. I get a false positive in *any*
of my apps that uses NSURLConnection, for example:

NSURLConnection* con = [[NSURLConnection alloc] initWithRequest:req
delegate:self];

That triggers a "potential leak" warning. Well, of course it is a
*potential* leak. But it isn't a *real* leak, because I happen to know that
I'm going to release this object in either connection:didFailWithError: or
connectionDidFinishLoading:. (My code and memory management come right out
of Apple's own examples here.) I know how NSURLConnections work; the static
analyzer doesn't. But I would hardly call that a bug.

m.

-- 
matt neuburg, phd = [email protected], http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to