Re: TableView leaks a lot of memory
Re: TableView leaks a lot of memory
- Subject: Re: TableView leaks a lot of memory
- From: Bill Bumgarner <email@hidden>
- Date: Mon, 16 Feb 2009 10:29:52 -0800
On Feb 15, 2009, at 11:44 PM, Anders Lassen wrote:
Hi,
Ok, I will file this as a bug.
Kind regards,
Anders Lassen
Thanks. Got it. The problem -- and it is a bug in the frameworks on
the system -- is that the collector doesn't seem to reap anything in
your application unless a "real" event is processed. Timer events
don't count. (I think your bug will be a dupe of an earlier bug, but
your simple test case is very much appreciated, regardless).
If you add...
[[NSGarbageCollector defaultCollector] collectExhaustively]
... to your timer method, the collector reaps memory as expected.
A bit of a heavy hand. Alternatively, I'd bet -- but haven't tested
-- that you could post an NSEvent to NSApp via -postEvent: and memory
would stay stable (and the collector would do a better job of
generational collection).
b.bum
_______________________________________________
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