Re: NSTimer won't stop (SOLVED)
Re: NSTimer won't stop (SOLVED)
- Subject: Re: NSTimer won't stop (SOLVED)
- From: Michael Becker <email@hidden>
- Date: Tue, 11 Oct 2005 17:46:22 +0200
Am 11.10.2005 um 16:53 schrieb Michael Becker:
I have a problem with NSTimer. When my application needs to load a
lot of big images, I do that in a thread. I want to display that
load process to the user, so in my main thread, I set up a timer
that refreshes my application's custom image view every 0.1
seconds. The view is a custom view designed to show a certain
number of images and documentation tells me to always load GUI
refreshes from the main thread. This mechanism works very well so far.
However, the timer doesn't stop, which leads to my application
spending almost 80% of available CPU on redrawing the view, even
when the loading is finished and it should do nothing.
Again, I spent hours solving this and right after I ask the list I
find the solution: My threads got messed up a little so in certain
situations a new timer was scheduled before the old one was
invalidated. So I basically had one timer flying around with no
reference to it anymore...
Regards,
Michael
_______________________________________________
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