Re: GC pros and cons
Re: GC pros and cons
- Subject: Re: GC pros and cons
- From: Peter Ammon <email@hidden>
- Date: Thu, 25 Jun 2009 14:00:28 -0700
On Jun 25, 2009, at 1:42 PM, Bill Bumgarner wrote:
On Jun 25, 2009, at 3:14 PM, Peter Ammon wrote:
In any case, it's been my experience that GC makes memory
management much easier, but precious resource management somewhat
harder. It's harder because GC forces more of a divorce between
the management of memory and precious resources, and the precious
resource management techniques are about on the level with C circa
1989.
Really, retain/release requires such a separation, too. At least,
it does for relatively complex, often concurrent, piles of code.
I totally agree, which is why I said "more of" a divorce. Since
retain/release is more deterministic than GC, it allows you to
tolerate ordering dependencies and tying resource lifetime to memory
lifetime for longer. But it ultimately breaks down as complexity
increases, just as you say.
The switch to GC has forced me to redesign a number of classes. But I
usually find that the redesigned classes work better under retain/
release as well.
-Peter
_______________________________________________
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