On Fri, Apr 9, 2010 at 1:15 PM, Alexey Zinger <[email protected]> wrote:
> I've never done any real Objective-C coding, but read a bit about it when I > was considering getting into iPhone development. It is my understanding > that initially Objective-C came with no memory management, but has since > attained garbage collection. This means that one has to decide from the > start which way they want to go and pick libraries/frameworks accordingly. > Searching for "object c garbage collection iphone" revealed a number of > interesting resources, including this > one<http://memo.tv/memory_management_with_objective_c_cocoa_iphone> > . > I've done a little Mac programing and a little iPhone dev in Objective-C. Originally, I thought it was pretty cool. I've written tons of C and Smalltalk, so seeing a mashup of those two seemed neat. And for the first few months, it was OK. It gets really tedious after a while. Having written Java for 15 years, and done extensive work in Ruby and The Groovy, I found Obj-C to be an anachronism that wasn't much fun to work with. I will say that Xcode (make sure you capitalize it like that when you post on an Apple forum, or you will be soundly bludgeoned by the hardcore guys) and Interface Builder do make knocking up a UI with working parts pretty easy. Java UI builders could learn a thing or two from IB. As for memory management, it's true that Objective-C 2.0 has garbage collection, but this is ONLY on the Mac. The iPhone has no GC, so you have to use the regular Obj-C reference counting methods. You can use Autorelease Pools, to relieve yourself of some of the burden, but I've read several articles frowning on those, so YMMV. When you are doing reference counting, you have to ensure that anything you allocate, you release at some point; otherwise leaks ensue. Joey -- Blog: http://joeygibson.com Twitter: http://twitter.com/joeygibson FriendFeed: http://friendfeed.com/joeygibson Facebook: http://facebook.com/joeygibson -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
