Re: Garbage Collection makes my app look fat
Re: Garbage Collection makes my app look fat
- Subject: Re: Garbage Collection makes my app look fat
- From: j o a r <email@hidden>
- Date: Mon, 25 Feb 2008 15:44:10 +0100
On Feb 25, 2008, at 7:00 AM, August Trometer wrote:
Then I turned off Garbage Collection, and memory usage plummeted to
the level I was expecting.
I'm still getting my feet wet with Garbage Collection, and I don't
entirely trust it. Is there something I've missed in the docs to
explain this behavior? I'm guessing that, at some point, the extra
memory will be reclaimed, but for a user, seeing 500MB of real
memory usage would be, well, off-putting, especially for a rather
small app.
I'd very much like to use GC, but unless I can keep that number
down, I simply can't. Any suggestions?
Some of our old design patterns for GC-Off needs to be modified to
work well with GC. You can have a single code base for both GC-Off and
GC, but you can't expect to just flip the switch and have your old GC-
Off code suddenly work without problems in GC. You need to start with
figuring out why and where you leak memory, and then use that
information to resolve your problems.
The tools available to help you with this analysis on Mac OS X is a
bit rough at this point, but you can google for information about
ZoneMonitor, and also look into the new gdb commands:
info gc-roots
info gc-references
j o a r
_______________________________________________
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