• 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: Who's NSDelayedCallbackCenter and why is he retaining a huge load of junk?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Who's NSDelayedCallbackCenter and why is he retaining a huge load of junk?


  • Subject: Re: Who's NSDelayedCallbackCenter and why is he retaining a huge load of junk?
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 23 Dec 2008 17:37:39 -0800


On Dec 23, 2008, at 3:28 PM, Miguel Arroz wrote:

Hi!

I have an auxiliary application that essentially launches a thread and waits for requests to exist on the database do process them.

During the processing, many objects are created and saved. I took all the precautions to avoid high memory usage (like creating small batches of objects and saving them, disposing ECs, etc). This didn't prevent the app from using all the allocated memory and blowing up.

After some investigations, I found out that I have hundreds of thousands of objects (mainly undo managers) retained by some NSDelayedCallbackCenter. The docs say this guy holds some calls to be done after the RR loop finishes.

Now, my problem is that there's no RR loop here. So... what's going on? Do I have to manually tell the NSDelayedCallbackCenter to run the queued selectors? How? And what exactly means "in the end of the RR loop" if I have an app that actually handles requests and it's handling them concurrently?

Man, you have some mad skillz in finding these problems! NSDelayedCallbackCenter is thread specific, each thread has its own default center. So when one of your processing threads gets to the end fo a block of work, it should/could call NSDelayedCallbackCenter.defaultCenter().eventEnded(); Or just get rid of the undo manager. That did not used to work for some scenarios of deleting objects.



Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Who's NSDelayedCallbackCenter and why is he retaining a huge load of junk? (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: WO 5.3 or 5.4
  • Next by Date: Re: Recording and looking up dates, when day-wide precision is required
  • Previous by thread: Who's NSDelayedCallbackCenter and why is he retaining a huge load of junk?
  • Next by thread: How to programatically set the undo default stack size to 0?
  • Index(es):
    • Date
    • Thread