Re: Slowwwwww releasing of text views
Re: Slowwwwww releasing of text views
- Subject: Re: Slowwwwww releasing of text views
- From: John Stiles <email@hidden>
- Date: Mon, 6 Dec 2004 15:08:14 -0800
On Dec 6, 2004, at 11:55 AM, Izidor Jerebic wrote:
On Dec 6, 2004, at 7:31 PM, Izidor Jerebic wrote:
I have an application which creates a lot of text views in the
window. When this window is closed, it takes enourmous time to
release it.
Shark shows that most of the time is spent in [NSNotificationCenter
removeObserver....] inside text storage and layout manager. I tried
to release these text views in another thread(s), to continue event
processing and user would not need to wait, but it seems that those
releases are forced to happen on main thread, because the event
processing does not proceed until after everything is released...
Does anybody have any idea how I could make this window close
operation faster or at least perform in background and not interfere
with event processing?
I have forgotten that those views are probably autoreleased somewhere,
and autorelease pools are cleared after each event. This was the cause
for delay. I have now managed to start release of these objects in
separate threads, and user can continue working after the window is
closed, though a bit slowly at first until all objects are freed.
Anyway, any suggestions for speedy dealloc of text views are still
welcome...
Your app will probably become unstable/crashy if you try to release
NSTextViews from a thread other than the main thread. :|
_______________________________________________
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