On Jul 8, 2013, at 20:28, Andreas Mayer <andr...@harmless.de> wrote:
> It seems like when I call -setNeedsDisplay:YES the system is spawning a timer 
> to do something later on and when those calls come in too fast, that timer is 
> leaked.
> 
> Any idea what I could do about that?
> (I tried calling -setNeedsDisplay:YES only if -needsDisplay is NO which 
> didn't help.)
> 
> Is there a way I can draw as fast as possible without triggering this problem?

I don’t think the timers leak. Instead, I think they probably just queue up on 
the event loop because their fire interval is greater than that at which you 
add new timers by calling setNeedsDisplay. Could that be it?

FWIW, I remember hearing at some WWDC that MacOS X caps its drawing at a 
certain frequency. I think it was either 60Hz or 60fps, not sure anymore. So my 
guess is it’s not worth trying to draw any faster because the back buffer is 
only flushed to the screen at this slower interval anyway.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to