Wagnar,

Thanks for the comments. I agree that experience in using retain/ release is good to have, especially with iPhone. Although I have no plans for an iPhone app right now, I certainly would not rule it out. I did do a kind of hello world using the iPhone simulator though -- maybe I can market that through iTunes, ;-). However, I have written a number of simple Cocoa applications using retain/release just to build up my experience level but this question on GC is motivated by a more serious effort and starting from scratch.

Having been a programmer for over 40 years with 20 years in C++, having to do my own memory management is certainly not a new thing for me. Though, I must admit, I do prefer GC languages and I much prefer Java over C++.

phil


On Jun 22, 2009, at 8:14 AM, WT wrote:

On Jun 22, 2009, at 4:58 PM, Phil Hystad wrote:

Being relatively new to Cocoa and Objective-C, what is the consensus on using the new version 2.0 managed memory features (garbage collection).

If you were writing a new Cocoa application from scratch, would garbage collection be the preferred method over the reference counting (retain/release) method. Having spent years in Java I would prefer a GC'd approach but I have also seen the great improvement of GC in Java over the years. Therefore, I am also curious on how the new Objective-C design for GC compares.

The applications I have in mind are mostly graphic (Quartz 2D) oriented and likely also some OpenGL work.

Thanks for your opinions and comments.

phil

Hi Phil,

I've also lived in java-land for a long time, so I understand where you're coming from. I've since come to think that spending some time coding without gc has the great advantage that it forced me to be more attentive and careful in my coding practice. Ultimately, of course, it would be nice not to have to worry about memory management at such fine-grained level, but the lessons I learned by coding without the gc safety net will be with me when that day comes. Also, if you're programming for the iPhone OS, you have no choice at the time being because the iPhone OS does not support gc.

Wagner

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to