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 (Cocoa-dev@lists.apple.com)
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 arch...@mail-archive.com