• Advertisement
Sign in to follow this  

Differnt Type of Memory Leak?

This topic is 4276 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

Okay normal directX leaks are shown like this: Direct3D9: (INFO) :MemFini! Direct3D9: (WARN) :Memory still allocated! Alloc count = 365 Direct3D9: (WARN) :Current Process (pid) = 00000d1c Direct3D9: (WARN) :Memory Address: 014800a0 lAllocID=1 dwSize=000047f8, (pid=00000d1c) Direct3D9: (WARN) : Stack Back Trace Direct3D9: (ERROR) : [0] : Address 011FD4CB Direct3D9: (ERROR) : [1] : Address 011FD59B Direct3D9: (ERROR) : [2] : Address 011FD440 Direct3D9: (ERROR) : [3] : Address 011F1D44 Direct3D9: (ERROR) : [4] : Address 4FDFAF2E Direct3D9: (ERROR) : [5] : Address 00458F9D Direct3D9: (ERROR) : [6] : Address 0045627D Direct3D9: (WARN) :Total Memory Unfreed From Current Process = 4200466 bytes But I cleaned up the memory leaks, but Now I have this: Direct3D9: (INFO) :MemFini! The thread 'Win32 Thread' (0x954) has exited with code 1 (0x1). D3DX: MEMORY LEAKS DETECTED: 2 allocations unfreed (1060 bytes) D3DX: Set HKLM\Software\Microsoft\Direct3D\D3DXBreakOnAllocId=0x1 to debug The program '[2136] test.exe: Native' has exited with code 1 (0x1). Im am not even sure what this means, let alone how to find something with the alloc Id of 1. I know the device is being released. Thanks for any help.

Share this post


Link to post
Share on other sites
Advertisement
The leaks aren't from the D3D runtime, but are from the D3DX library. You created something with D3DX and didn't free it (e.g. PRT stuff). Set the key mentioned in the debug output to find out what it is exactly that you didn't free.

Share this post


Link to post
Share on other sites
MetaKnight,

It appears as though you are now freeing all of your core direct3D resources, however there are still some Direct3DX (D3DX) extension resources which need to be freed. This is likely caused by one of the D3DXCreate* functions or utilizing any of the D3DX helper functions to allocate memory.

Run "regedit" from commandline or from the "run" box in your start menu. From there, navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Direct3D
Once there, either set the value for, or create, the key called "D3DXBreakOnAllocId" After you have created it (or as you create it) set the value to "0x1".

This will tell the D3DX debug runtime to break on any D3DX allocations. Once you see where you're allocating memory, it should be easier to determine where you're not freeing it. I haven't used this feature myself, but it sounds straight forward enough

Cheers and good luck!

Share this post


Link to post
Share on other sites
Thanks guys!

It did seem to be D3DXCreateMatrixStack

That was the first time I had seen that message so it threw me off.

Share this post


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

  • Advertisement