As I had finished the renderer, which by the way works like a charm, I reordered some object creation stuff. I ran the project and it looked great, considering the artwork, except for the small fact that the depth sorting is a bit rusty with huge tiles that doesn’t stand straight up. That is easily taken care of by rendering the ground before everything else since it’s flat, just got to implement it in the renderer.
The result when I closed the program wasn’t as great though – 298 memory leaks detected by the Direct3D debug runtime. I was quite upset since I had already spent some time a few days ago debugging the whole thing and I managed to get rid of every single memory leak, and now I had another 298 to figure out. I was convinced that it had to be a bug somwhere, so I rebuilt the whole solution. That didn’t solve the problem som I restarted the computer and tried again; same result. I took a deep breath and started the debugging. It took me while before I noticed what was happening. Apparently the ISceneNode::VDestroy was overloaded by the object who happened to be the root and it did basically nothing, this was really easy to solve and the program worked without a single Direct3D memory leak (I don’t check for regular memory leaks yet).
~Daniel