Oh, cocoa, just when I’m starting to think I’ve got you figured out, you quickly show another side of you just for the purpose of letting me know that you aren’t just any other framework.
I’m stumped. I’ve recently discovered that Sneaky Bastard’s snapshot writing routine has been acquiring memory incrementally. It wasn’t noticeable for the last few weeks because all I’m seeing in my geek tool report are the memory footprints of much bigger programs like Safari and Xcode. But once I’ve cleared my desktop of any major applications, that’s when I start to realize it. On it’s initial launch, Sneaky Bastard will take 12 Mb from the memory, but after making that first snapshot, that will increase to 18 Mb. It should stay that way, right? Since it would essentially be doing the same thing throught it’s lifetime. Under 20 Mb for a small utility should be enough to do it’s job. Unfortunately, that’s not true in the current version. Because after every call to the snapPhoto method, Sneaky will gradually increase it’s memory footprint. Still not really that bothersome to me, it increases memory consumption by 2 Mb per snapshot taken, because I shutdown my Mac daily. So everyday, it starts back from 12 Mb. But this certainly won’t do for a program whose main raison d’etre is to run without user supervision on a variety of unanticipated scenarios. And it certainly won’t serve Sneaky well in it’s just recent harmonious relationship with the darwin kernel. If that memory usage keeps growing, suppose a Mac isn’t being shutdown for days, it will be just a matter of time before that little utility that quietly sits on the menu bar becomes a little annoying utility that hungrily consumes all the computer’s memory and leaves very little to it’s neighbors… and ultimately resulting in a crash.
Read More »