This is as funny as it is interesting so I thought I'd let you all take a look. I'm currently developing a 2D engine as part of a small 3D engine project, the 2D interface uses DirectX9 textured quads to display graphics. (If anyone happens to be interested).
Anyway I started setting up the animation functions for the sprite class. In short I made a terrible mistake, rather than load the textures into video ram before hand, then change them each frame, the program instead loaded them into ram every frame. That's about 25kb of memory lost, sixty times a second.
I submit to you evidence of this programmers worst nightmare, oh mighty task manager show me why my framerate is dropping!

P.S. Apologies for the file name, at the time it was the only thing I could think!
http://img207.imageshack.us/img207/9410/holycrap.jpg
http://img207.imageshack.us/img207/4034/crap2.jpg
http://img268.imageshack.us/img268/7474/crap3.jpg
http://img207.imageshack.us/img207/2458/crap4.jpg

You may notice the permanently leaked 2GB :p

Recommended Answers

All 2 Replies

I guess its time for you to toss what you've done into the bit bucket and do it again the right way.

I guess its time for you to toss what you've done into the bit bucket and do it again the right way.

Well I've re-written the function and tweaked the class and it actually switches texture-memory addresses to animation 'backbuffers' now, thus no leakage! However I still thought it worthy of note :p

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.