• 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: Leak when "drawing too fast"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leak when "drawing too fast"


  • Subject: Re: Leak when "drawing too fast"
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 10 Jul 2013 02:10:23 +0200

On Jul 8, 2013, at 20:28, Andreas Mayer <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Leak when "drawing too fast"
      • From: Andreas Mayer <email@hidden>
References: 
 >Leak when "drawing too fast" (From: Andreas Mayer <email@hidden>)

  • Prev by Date: How to make popover size to match content?
  • Next by Date: Unrecognized selector in release build, not in debug build
  • Previous by thread: Leak when "drawing too fast"
  • Next by thread: Re: Leak when "drawing too fast"
  • Index(es):
    • Date
    • Thread