• 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: Fastest way to do screen captures on OSX ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fastest way to do screen captures on OSX ?


  • Subject: Re: Fastest way to do screen captures on OSX ?
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 15 Oct 2013 22:52:14 -0700

On Oct 9, 2013, at 8:16 PM, Mauritz Jameson <email@hidden> wrote:

> The screen capture function is being called every 100ms approximately

Please tell me you’re not writing spyware… :-p

> and
> these frequent function calls seems to slow everything else down. After my
> program has run for a little while, the desktop and mouse pointer becomes
> very laggy/non-responsive. …

What you’re describing is exactly what happens when the OS starts thrashing due to too much memory being allocated. It sounds like your code has some serious memory leaks.

The easiest way to look at the memory usage of your app is with the Activity Monitor app. Or if you’re more comfortable in a shell, use top. The most significant statistic to look at is RPRVT.

I took a brief glance at your code, and it definitely looks like you’re not cleaning up everything you need to. I’m not very familiar with the CoreGraphics API, but you call CGWindowListCreateImage and then never seem to dispose/release/free that image. Considering that the image ref must be holding onto a giant pixmap the size of the screen, that’s probably the source of your problem.

—Jens
_______________________________________________

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


References: 
 >Fastest way to do screen captures on OSX ? (From: Mauritz Jameson <email@hidden>)

  • Prev by Date: Re: Cocoa class extension best practice
  • Next by Date: Re: NSTextView without word wrap
  • Previous by thread: Fastest way to do screen captures on OSX ?
  • Next by thread: Re: Fastest way to do screen captures on OSX ?
  • Index(es):
    • Date
    • Thread