Until this week I'd kept the audio portion of the project low on the priority list. How hard could it be to implement a SoundManager class? Well, in most cases the answer is "not that hard". But as I ran my character around the terrain, and as bat wings started flapping in the distance, I noticed the memory usage in IE7. It was climbing and never stabilizing. Every flap of a wing consumed about 40kb. And then another. And then another.
Long story short, it turns out to be an apparent situational memory leak in Silverlight's MediaElement. I've submitted a bug and it's being investigated, but I have no viable workaround for it at the moment. I'm continuing to work on other things but I'm unsettled. I don't want to release a demo knowing there's an inherent memory leak, even if it's not my fault.
On a more positive note, things are really coming together. Night/day cycles are implemented, ambient sounds are enhancing the atmosphere dramatically, and I'm working on additional creature animations. I've always heard it's bad luck to kill a spider; well, perhaps by creating one I'll have some luck with this memory leak debacle.
Despite the ups and downs, this is the drama of software development that I live for. This is the phase of development I find the most rewarding, when hours fly by, when it's 4:30 in the morning and I've only got a half hour before Starbucks opens. Nothing washes away the sting of a memory leak quite like a grande nonfat caramel macchiato...