[cfe-dev] NSAutoreleasePool checker

Ted Kremenek kremenek at apple.com
Fri May 27 07:13:16 PDT 2011


Hi David,

The point of this checker is to find bugs.  Enabling all the time is likely to produce a significant amount of noise on real world code while providing no real value.

That said, I think there should be a way to opt into the check even if you are in non-GC, but I don't think that turning it on all the time is the right answer.  I'm very skeptical that's what most people would want.

Ted

On May 27, 2011, at 3:14 AM, David Chisnall <csdavec at swan.ac.uk> wrote:

> Hi Everyone,
> 
> Currently the NSAutoreleasePool checker in the static analyser is only enabled in GC mode.  Does anyone object if I enable it unconditionally?  Sending -drain instead of -release to autorelease pools works in both GC and non-GC mode, while sending -release is a no-op in GC mode, so it's good style to use -drain always (recent Apple examples use -drain even in non-GC mode).
> 
> David
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list