Jump to content
  • Advertisement
Sign in to follow this  
lukesmith123

Tracking down memory leaks

This topic is 2644 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Thanks that gave me more info but I'm still really stumped with this.

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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!