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 protected])

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 [email protected]

Reply via email to