• 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
Main Thread autorelease pool, memory usage question?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Main Thread autorelease pool, memory usage question?


  • Subject: Main Thread autorelease pool, memory usage question?
  • From: Chad Podoski <email@hidden>
  • Date: Mon, 15 Dec 2008 16:53:23 -1000

I have a process that is uploading images. My issue is as following, when uploading a large number of images and my application does not have focus, memory usage continues to climb until it is maxed out, causing the app to hang/crash. On the other hand, if the app has focus and the user clicks anywhere in the app, memory is released and memory usage stays low. While this is occurring in the main thread, the actually connection work is being done in a separate thread (via ConnectionKit). The action of the user clicking in the app appears to trigger an interrupt, allowing memory to be released or the main thread to manage its autorelease pools. Couple of questions:

1) Why is the main thread not managing the autorelease pool(s) without this user interrupt?
2) Is there a way to trigger the main thread to cleanup its autorelease pools?
3) If not, is there a way to simulate the user click or trigger the same underlying reaction to it, programmatically?
4) Am I completely off base with my hypothesis?


Thanks,
Chad
_______________________________________________

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


  • Follow-Ups:
    • Re: Main Thread autorelease pool, memory usage question?
      • From: "Michael Ash" <email@hidden>
    • Re: Main Thread autorelease pool, memory usage question?
      • From: "Ken Ferry" <email@hidden>
  • Prev by Date: NSOutlineView assertion failure on collapse
  • Next by Date: Re: proper way to release a static NSMutableDictionary?
  • Previous by thread: Re: NSOutlineView assertion failure on collapse
  • Next by thread: Re: Main Thread autorelease pool, memory usage question?
  • Index(es):
    • Date
    • Thread