Re: Who's NSDelayedCallbackCenter and why is he retaining a huge load of junk?
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