Okay, in the documentation that came with PB, it states that an NSTimer will add itself to the RunAppLoop function and stay there forever. No matter what, you can't get rid of it; the best you can do is "invalidate" the timer.
I find this very disconcerting. I'm not programming this example program that I'll use here, but still, for future reference I'd like to have other possible options....
Let's say we're writing an Othello game. Every turn made, you want to animate the discs being flipped, so you use a timer to animate them at a good speed. Now when they are done flipping you "invalidate" the timer, but the object still lingers around! I could delete it i guess, but it is still in the RunLoop!?
Now when the next player moves, we need to flip discs again. So, now that the other timer is invalidated, we make a new timer ... until there are 'n' timers floating around, all invalidated....
So, a couple questions:
1. Can you reactivate a timer once you've deactivated it (perhaps by "firing" it)?
2. How does the RunLoop work? If whenever it adds a timer it adds a (for simplicity sake) for(all timers) { if ([timer[i] isValid]) { ... } } then I DON'T want these timers floating around when I'm done with them... can I get rid of them?
Thanks!
Jeff