On Jul 15, 2011, at 2:28 PM, Jordy Rose wrote: > This seems like another of those cases where we should prefer 'nil' and then > 'NULL' to straight 0. I know it's a coding style thing, but 'nil' seems to be > Apple's style, for variables with object type anyway. (Not sure what's best > for blocks and CFTypeRefs.)
Fair point; in r135309. > > Jordy > > > On Jul 15, 2011, at 14:11, Argyrios Kyrtzidis wrote: > >> Author: akirtzidis >> Date: Fri Jul 15 16:11:23 2011 >> New Revision: 135301 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=135301&view=rev >> Log: >> [arcmt] For: >> >> id x = ... >> @try { >> ... >> } @finally { >> [x release]; >> } >> >> Migrator will drop the release. It's better to change it to "x = 0" in a >> @finally to avoid leak when exception is thrown. >> >> rdar://9398256 >> >> Modified: >> cfe/trunk/lib/ARCMigrate/TransRetainReleaseDealloc.cpp >> cfe/trunk/test/ARCMT/releases.m >> cfe/trunk/test/ARCMT/releases.m.result > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
