Showing posts with label idiocy. Show all posts
Showing posts with label idiocy. Show all posts

Saturday, July 25, 2009

The Truthiness of Things I Said on DotNetRocks

When I recorded a recent episode of DotNetRocks I recorded my side of the conversation so that the sound engineers would have a cleaner copy of what I said then what went through the phone lines. And I've listened to what I said several times, and every time I do, I find a mistake I made; things I should and did know but in the course of talking quickly for an hour off the cuff didn't get quite get right.

  • Said that Adobe had taken over development of Java for OS X when I should have said they took over the Java SWT.
  • Should have kept my opinion of Java GUIs to myself since I haven't used SWT
  • Confused NSSortDescriptor with NSPredicate when it came to extracting Core Data
  • I strongly implied that Cocoa was for GUI work when of course, it's great for most aspects of application development including threading and networking
  • Completely garbled the relationship properties of Core Data objects
  • Turns out that the C++ paths dialog in Visual Studio is actually resizable. It's just really easy to miss the drag target.


Also, I say "You Know", "Like", and "Uh" way too often; and I was completely unaware that I did so.

Thursday, November 06, 2008

When Is A Leak Not A Leak

I was sent a bug report on some software I had written a while back wherein it would become less and less responsive over time till it just sort of died. Sounds like a leak.


But when I hooked it up to the Leaks Instrument, I saw no leaks. No red peaks at all. Must not be a leak then.


But one more look. The net objects allocated were going up and up and up. This should not happen, the application should have reached an equilibrium point of net objects allocated, and oscillated around it.


So, I let it run for a while in the Objects Allocated instrument, and then examined the blocks which were being allocated and not deallocated. Turns out I had an object, an audio player, which had a scheduled NSTimer associated with it. When I released the player, it was still being referred to by the NSTimer, so it did not get deallocated. And in this case, I was creating one of these every second or so (probably not a good idea), which meant that not only was the memory leaking, but all those timers were adding overhead to the event loop. No wonder it crawled to a halt. So remember to invalidate unwanted timers.