Error message from DirectX debug

Started by
1 comment, last by kinglink 19 years, 1 month ago
I get this error message from my debug sessions now.

Direct3D9: (ERROR) :Memory still allocated!  Alloc count = 4
Direct3D9: (ERROR) :Current Process (pid) = 00000e9c
Direct3D9: (ERROR) :Memory Address: 003254ac lAllocID=1 dwSize=000047f8, ReturnAddr=00da14db (pid=00000e9c)
Direct3D9: (ERROR) :Memory Address: 0032bacc lAllocID=9 dwSize=00001290, ReturnAddr=00d98044 (pid=00000e9c)
Direct3D9: (ERROR) :Memory Address: 00323054 lAllocID=10 dwSize=00000008, ReturnAddr=00d98132 (pid=00000e9c)
Direct3D9: (ERROR) :Memory Address: 0032cd94 lAllocID=11 dwSize=00000600, ReturnAddr=00d9970f (pid=00000e9c)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 24720 bytes
I'm a bit confused because I do a "safe_release" macro on all them , here's both my macros

#ifndef SAFE_DELETE
    #define SAFE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
#endif   
#ifndef SAFE_RELEASE
    #define SAFE_RELEASE(p)      { if(p) { (p)->Release(); (p)=NULL; } }
#endif
I don't know how to debug memory address really. And I safe released all my textures (2) my sprite device, my D3D device, my Direct Input, my Keyboard mouse and Joystick device (even though I don't even start the joystick) What more can it be? the only other directX work is....

D3DPRESENT_PARAMETERS m_d3dpp; 
D3DDEVICE_CREATION_PARAMETERS m_d3ddcp;
D3DXMATRIX m_matProjection;
Anything you can do to try to help me out?
Advertisement
Somewhere there's an option to break on allocid. You want to break on allocid 1, 9, 10, and 11. This will throw you into the debugger when these resources are created. Knowing which items aren't being freed should help you track down where you're losing track of them. I'll see if I can find where the break on allocid is...

edit:
Here. Basically, "To determine what objects are involved, you can use the AllocID shown for each object to locate the code that initially allocated each object. To do this, go to the Direct3D tab of the DirectX control panel and enter the AllocID in the "Break On AllocID" field, and apply the change. Run a debug build of the application from the VC++ IDE, and the debugger will break into the program at the point of allocation with the specified AllocID."
got bump this but I sorta gave up caring because I found the allocID1

I apparently haven't released a Background texture, but I actually have released it, the code actually points directly to the release code right before closer? Is there any reason for the macro to fail?

Edit: Oh yeah ignore this. I forgot I fixed the release problem.

This topic is closed to new replies.

Advertisement