Re:Android versus iPhone Development: A Comparison
by boucher on Sunday July 05, 2009 @11:43PM
(#689096)
Reference counting really isn't that hard to follow. Cocoa's conventions are pretty straightforward. You need to release (or autorelease -- which by the way is great) for every call to alloc, retain, copy (inc. fooCopy), or new (inc. newFoo). Everything else is autoreleased. Exceptions are documented.
For instance if you try to write a C extension for Python or Tcl or other systems using reference counting you'll notice that if you don't know every well the internals it can be not obvious when to increment or not the refcount.
I use refcount myself in Redis, and again for people not used to Redis internals to implement a new command may not be trivial exactly for this problem of reference counting. Reference counting is not something to expose for a language that aims to be a such an higher level. In short every language with complex OOP system should have some kind of automatic memory management IMHO.