• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need help with a nasty memory management problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Need help with a nasty memory management problem
      • From: Andreas Mayer <email@hidden>
References: 
 >Need help with a nasty memory management problem (From: Michael Heinz <email@hidden>)
 >Re: Need help with a nasty memory management problem (From: Andreas Mayer <email@hidden>)
 >Re: Need help with a nasty memory management problem (From: Michael Heinz <email@hidden>)
 >Re: Need help with a nasty memory management problem (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: Reverse engineering
  • Next by Date: Re: Memory management problem - solvee
  • Previous by thread: Re: Need help with a nasty memory management problem
  • Next by thread: Re: Need help with a nasty memory management problem
  • Index(es):
    • Date
    • Thread