RE: GC pros and cons
RE: GC pros and cons
- Subject: RE: GC pros and cons
- From: Jeff Laing <email@hidden>
- Date: Thu, 25 Jun 2009 00:40:21 +0000
- Acceptlanguage: en-US
- Thread-topic: GC pros and cons
> I think it depends what language you weaned yourself on. If you've used Lisp or some other
> functional language, manual reclamation is an unthinkable monstrosity. If you weaned yourself
> on C or similar languages, manual reclamation seems like the default state of play.
Its also going to be an issue whether you are the sort of person who worries at the technical details and fusses over memory footprints (and whether you think those things are important). I had to laugh just yesterday when I came across this article:
http://www.simple-talk.com/dotnet/.net-framework/understanding-garbage-collection-in-.net/
(Yes, I do .NET as well as Cocoa)
No real surprises there, except for the closing paragraphs which can be paraphrased down to "If you need memory to be collected efficiently, you should implement IDisposable and call Dispose() explicitly when you are done with your objects". Which gives a net gain of zero, since you need to call Dispose() exactly where you used to call Release(). To make the automatic model (GC) work efficiently every time, you need to replicate the manual (retain/release) model, all the while presumably telling yourself that "this is so much better than what I had".
_______________________________________________
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