[D3D9] Memory Leak stemming from D3DXLoadMeshFromX
Managed to track down the problem, I'm allocating two textures to the object but for whatever reason it thinks that there is only one when I attempt to get the size of the array. I at least know the problem now, so I'll look into it a little more before I head to sleep
int numObjects = sizeof(i->second) / sizeof(LPDIRECT3DTEXTURE9*);
This is your error. sizeof() returns the size of the pointer(the size of one LPDIRECT3DTEXTURE9*), not the total size of the array. You'll have to manually track the number of elements in your array or use std::vector instead.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement