Re: Need help with a nasty memory management problem
Re: Need help with a nasty memory management problem
- Subject: Re: Need help with a nasty memory management problem
- From: Michael Heinz <email@hidden>
- Date: Sat, 6 Aug 2005 08:40:07 -0400
On Aug 6, 2005, at 7:59 AM, Andreas Mayer wrote:
Anyway, I did resolve the issue by using timer events to break up
my work loop instead of just grinding through an entire 900 page
document in one chunk.
Isn't it more common to just add your own autorelease pool inside
that loop?
Andreas
It could well be - I don't know how to do that.
But, given the name, I'm not sure how that would work. Could you give
me an example?
I'm releasing the objects (nsimages mainly) when I'm done with them,
but autoreleased objects are recovered as part of the main
NSApplication run loop that manages events - if the run loop doesn't
get to run then the objects are never garbage collected.
That was why the timer was a solution for me - it allows the main
loop to run for 5 hundredths of a second between iterations of my
actual work. Even though this is a miniscule amount of time, it
effectively makes the app much more OS friendly.
---
Porkchop D. Clown
Balloons, Buffoonery and Balderdash.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden