I just implemented an animated mesh class with Direct3D 9 and I have a small amount of memory thats leaking.
The built in memory leak detection shows me that its only 4 bytes long and shows the data as Data: < > 00 00 00 00
I have Directx set to debug but the information it gives me seems irrelevant as a leak causes so many other things to fail that I get 700+ errors and if I use Break on Alloc ID it just points me to something that clearly isnt where the problem is.
I checked through some tutorials on animated meshs and I am deleting and releasing eveything correctly.
Do I have any other options to try and track down this leak?
Tracking down memory leaks
Try Visual Leak Detector, it's a great tool for tracking memory leaks in Visual Studio.
http://vld.codeplex.com/
http://vld.codeplex.com/
Thanks that gave me more info but I'm still really stumped with this.
VLD show me this information about the link:
Does anybody know what this could be based on the D3DXFrameNumNamedMatrices ?
I'm only declaring three things in the class, AnimationController (which I release) the top frame which I destroy with D3DXFrameDestroy() and the array of matrices
which I delete.
So presumably the leak has to be in one of those? However if I'm releasing and deleting them properlly I cant see how the leak could occur.
I checked some tutorials on skinned meshes and I am cleaning up in the same way the tutorial code does in all cases.
Any ideas?
VLD show me this information about the link:
[font="Consolas"][size="1"][font="Consolas"][size="1"]
Call Stack:
c:\users\luke\desktop\directx program\directx program\allocatehierarchy.h (110): DirectX Program.exe!MeshAllocation::CreateMeshContainer + 0x1C bytes
0x5BF0CACE (File and line number not available): d3dx9_43.dll!D3DXFrameNumNamedMatrices + 0xD3 bytes
0x5BF0C355 (File and line number not available): d3dx9_43.dll!D3DXCreateKeyframedAnimationSet + 0x4FC bytes
0x5BF0CD48 (File and line number not available): d3dx9_43.dll!D3DXFrameNumNamedMatrices + 0x34D bytes
0x5BF0CDF9 (File and line number not available): d3dx9_43.dll!D3DXFrameNumNamedMatrices + 0x3FE bytes
0x5BF0CDF9 (File and line number not available): d3dx9_43.dll!D3DXFrameNumNamedMatrices + 0x3FE bytes
0x5BF0DEBB (File and line number not available): d3dx9_43.dll!D3DXFrameNumNamedMatrices + 0x14C0 bytes
0x5BF0E166 (File and line number not available): d3dx9_43.dll!D3DXFrameNumNamedMatrices + 0x176B bytes
0x5BF0E270 (File and line number not available): d3dx9_43.dll!D3DXLoadMeshHierarchyFromXA + 0x39 bytes
c:\users\luke\desktop\directx program\directx program\animatedmesh.cpp (28): DirectX Program.exe!AnimatedMesh::LoadContent
c:\users\luke\desktop\directx program\directx program\game.cpp (30): DirectX Program.exe!Game::Initialize
c:\users\luke\desktop\directx program\directx program\main.cpp (73): DirectX Program.exe!WinMain
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (547): DirectX Program.exe!__tmainCRTStartup + 0x2C bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (371): DirectX Program.exe!WinMainCRTStartup
0x75E9ED6C (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
0x779D37F5 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0xEF bytes
0x779D37C8 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0xC2 bytes
Data:
00 00 00 00 ........ ........[/font][/font]
Does anybody know what this could be based on the D3DXFrameNumNamedMatrices ?
I'm only declaring three things in the class, AnimationController (which I release) the top frame which I destroy with D3DXFrameDestroy() and the array of matrices
which I delete.
So presumably the leak has to be in one of those? However if I'm releasing and deleting them properlly I cant see how the leak could occur.
I checked some tutorials on skinned meshes and I am cleaning up in the same way the tutorial code does in all cases.
Any ideas?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement