if (SUCCEEDED(D3DXLoadMeshHierarchyFromXA(pFilename.c_str(),
D3DXMESH_MANAGED, d3d::GetInstance().GetDevice(), &Alloc, NULL, &m_pFrameRoot, &m_pAnimController)))
{
// load it also as a static mesh
if (FAILED(D3DXLoadMeshFromXA(pFilename.c_str(), D3DXMESH_MANAGED, d3d::GetInstance().GetDevice(),
NULL, NULL, NULL, NULL, &m_pStaticMesh)))
{
cout << "Failed to load mesh: " << pFilename << endl;
return false;
}
}
LPD3DXFRAME m_pFrameRoot;
CComPtr<ID3DXAnimationController> m_pAnimController;
CComPtr<ID3DXMesh> m_pStaticMesh;
D3DX: MEMORY LEAKS DETECTED: 4 allocations unfreed (48 bytes)
D3DX: Set HKLM\Software\Microsoft\Direct3D\D3DXBreakOnAllocId=0x125c5 to debug
I've verified that the D3DXLoadMeshFromXA is leaking, but the question is why?
When I comment out the D3DXLoadMeshFromXA line, I only get 24 bytes leakings (2 allocations)
Thanks
Jack