• 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: NSTimer won't stop (SOLVED)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSTimer won't stop (From: Michael Becker <email@hidden>)

  • Prev by Date: Re: awakeFromNib not called
  • Next by Date: Outline Views & Column Cells
  • Previous by thread: NSTimer won't stop
  • Next by thread: Outline Views & Column Cells
  • Index(es):
    • Date
    • Thread