struct BoneMesh: public D3DXMESHCONTAINER
{
ID3DXMesh* OriginalMesh;
std::vector<D3DMATERIAL9> materials; <<<<<<<<<<<
std::vector<IDirect3DTexture9*> textures; <<<<<<<<<<< these two annoying lines leak
DWORD NumAttributeGroups;
D3DXATTRIBUTERANGE* attributeTable;
D3DXMATRIX** boneMatrixPtrs;
D3DXMATRIX* boneOffsetMatrices;
D3DXMATRIX* currentBoneMatrices;
BoneMesh()
{
OriginalMesh = NULL;
NumAttributeGroups = 0;
attributeTable = NULL;
boneMatrixPtrs = NULL;
boneOffsetMatrices = NULL;
currentBoneMatrices = NULL;
}
};
No idea where it leaked.
Uhm. You have no destructor function in BoneMesh, which means you are not calling Release() on the IDirect3DTexture9's. If you're calling delete on the bone mesh (and not it's base type), then the materials array should be handled already.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement