On Sat, 05 Nov 2011 15:39:01 -0600 Philip McIntosh wrote:
> I am impressed with the implementation of Automatic Reference Counting (ARC) 
> in iOS 5 and the conversion tool built into XCode 4.2. I have an app that 
> generated a small leak each time I ran a "cycle" of the app. This was no 
> doubt caused by a design flaw since no matter how much I attended to my 
> retain/release cycles I could not get rid of one left over NSDecimalNumber at 
> the end of each operation.
> 
> I took the plunge and refactored the project to use ARC in XCode. There were 
> some very scary moments that generated many red warning flags, but I just 
> kept doing it, and after I did it 4 times all the problems cleared 
> themselves. That was a scary thing to do though.
> 
> I just checked the app with instruments, and sure enough, the memory leaks 
> are gone. 
> 
> Nice job Apple.

I tend to agree. I went through a similar exercise with an OSX app. The 
ARCified code runs fine and there appears to be only one minor leak (I think 
it's in Apple's own code).

One minor fly in the ointment -- ARC only works with Intel 64-bit apps and only 
on OSX 10.6 and 10.7. If you want to support earlier OS versions you need to 
build a separate app.

Jim Merkel
_______________________________________________

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