The bug happens when you load a texture twice. Since the texture is the same it only loads it once but when you go to delete that texture you'll find it actually loads it twice..
For instance, I have two planets both of them share a texture, but I could have a different texture for that planet, so I load the texture twice. Then when I go to clean up for a new level. I delete that texture twice and then dump the results to debug log and this is what I get:
Loads this texture:
Planet 1:
03-06-2010 14:09:36 | TEXTURE MANAGER : Loading of 'C:\Users\Toaster\Desktop\Space MMORTS\TestClient\bin\x86\Debug\..\Media\Textures\Planet\EarthEmissive.dds' successful 'Aomair_GlowTex' on index 21
Planet 2 uses the same texture.
Deleting the textures twice(no way of checking if its loading that texture twice) results in this:
03-06-2010 14:09:47 | Slot 25 : Texture 'Korubo_GlowTex' Filename 'C:\Users\Toaster\Desktop\Space MMORTS\TestClient\bin\x86\Debug\..\Media\Textures\Planet\EarthEmissive.dds' Format '827611204' Size '2048x1024'
In between each loading time it adds a texture resulting in 1 mb's of vram lost. Now imagine if I had more then one planet with several planets sharing the same textures. I would lose a lot more then just 1 mb of vram.
I talked with another TV'er and he did a quick test and found that he could duplicate it. I imagine I could delete the texture by calling TexFac.DeleteTexture(25); but I have no way of knowing what texture to delete..
Does anyone else suffer from this problem?
-Toaster