Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
- Subject: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
- From: Rainer Brockerhoff <email@hidden>
- Date: Thu, 7 Feb 2008 12:00:13 -0200
At 21:48 -0800 06/02/08, email@hidden wrote:
>From: Ben Trumbull <email@hidden>
>Date: Wed, 6 Feb 2008 19:52:43 -0800
>Message-ID: <p06240800c3cfe08b5e06@[17.201.24.182]>
>...
>As you've noted, objects behave a lot like structs under manycircumstances. I too find this incredibly useful, and have leveragedit for various (and nefarious) reasons.
>
>An analogy is light. You can argue it's a wave all you want, and itdoes have wave-like properties, but it's not a wave. Neither is itstrictly a particle. In lay terms, it behaves like both and, as faras it matters to me, light *is* both a wave and a particle.
>...
>Trying to mix scanned and unscanned memory, and work with scannedmemory via non-GC libraries, is possible but very difficult.Retrofitting large projects using old patterns can be veryfrustrating. It's my (personal) understanding that the focus was onnew projects and code written from the ground up with GC, and thiswas articulated at WWDC.
I would like to thank Ben and other Apple engineers (and other list members of course) who've presented excellent arguments on this very instructive thread. Some of these comments should really be included into the GC documentation.
While I'm looking forward to using GC in new projects that use bindings for a plug-ins GUI - to give an example where I found that handling retain cycles can be extremely frustrating - this thread confirms to me that it would normally be foolish to apply GC to existing projects. For most applications, once you really understand retain/release you can write correct, non-leaking code without thinking much about it.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden