"Thats who you are. Thats what you could." ------------------------------ - Goblineye Entertainment ------------------------------
Directx8 memory leak problem
for some unknown reason , my compiler (vc++ 6) keep telling me that i have a memory leak from some DirectX related memory allocation , and i checked everything , i cant see any thing wrong ,for every object that i create i call the Release() method as well when the application exits , its just strange...
thats what the compilers say in the debug window:
Direct3D8: (ERROR) :Memory Address: 01925efc lAllocID=8925 dwSize=000000f0, ReturnAddr=00c08826 (pid=0000029c)
Direct3D8: (ERROR) :Memory Address: 01926024 lAllocID=8926 dwSize=00000acc, ReturnAddr=00c08826 (pid=0000029c)
Direct3D8: (ERROR) :Memory Address: 0192544c lAllocID=8927 dwSize=00000038, ReturnAddr=00c08826 (pid=0000029c)
Direct3D8: (ERROR) :Memory Address: 01926c14 lAllocID=8933 dwSize=00000040, ReturnAddr=00c03d97 (pid=0000029c)
Direct3D8: (ERROR) :Memory Address: 01926c8c lAllocID=8934 dwSize=00000040, ReturnAddr=00c03d97 (pid=0000029c)
Direct3D8: (ERROR) :Memory Address: 01926d04 lAllocID=8935 dwSize=00000040, ReturnAddr=00c03d97 (pid=0000029c)
Direct3D8: (ERROR) :Memory Address: 01926d7c lAllocID=8936 dwSize=00000040, ReturnAddr=00c03d97 (pid=0000029c)
Direct3D8: (ERROR) :Memory Address: 01926df4 lAllocID=8937 dwSize=00000040, ReturnAddr=00c03d97 (pid=0000029c)
does anyone have any idea to what part/object in directx those allocation refers to? errr... have it ever happened to any of u?
thanks.
Yes, I''ve been noticing this, too. Your post reminded me to try and fix it!
If you haven''t done so already, check out the Microsoft DirectX mailing list archives at
http://discuss.microsoft.com/archives/DIRECTXDEV.html
Search around a bit and you can probably find a good answer, I remember this being discussed a while back.
If you haven''t done so already, check out the Microsoft DirectX mailing list archives at
http://discuss.microsoft.com/archives/DIRECTXDEV.html
Search around a bit and you can probably find a good answer, I remember this being discussed a while back.
Put the following regkey under Direct3D:
BreakOnAllocID
and set it to the LAST id that you see in your debug spew. D3D will then break when you allocate this resource. Pretty cool huh? Just note that since everything has a copy of d3ddevice, if you set the first one you might get a break on the init of d3d itself.
BreakOnAllocID
and set it to the LAST id that you see in your debug spew. D3D will then break when you allocate this resource. Pretty cool huh? Just note that since everything has a copy of d3ddevice, if you set the first one you might get a break on the init of d3d itself.
errr.... i tried what u have said , and it dont seem to work
i created this key under:
HKEY_LOCAL_MACHINE\Software\Microsoft\Direct3D
and i set it to the last ID , but it running without any break... , maybe im missing something?
thanks.
i created this key under:
HKEY_LOCAL_MACHINE\Software\Microsoft\Direct3D
and i set it to the last ID , but it running without any break... , maybe im missing something?
thanks.
I belive the way to break on an AllocID is to go to the Direct3D part of the DirectX 8.1 (and earlier versions?) control panel applet. There is an option to break on a particular AllocId, but I have never tried it.
Try a couple of things:
Make sure you are typing the allocID in decimal, not hex.
Also, you need to run in the debugger and you probally need to enable breaking on app generated exceptions (there''s a big long list of exceptions to break on, I beleive it is the last one).
I guess make sure its spelled right, it is case sensitive. My computer with that settings is kind of fragged right now, when it''s restored I''ll take a gander.
Make sure you are typing the allocID in decimal, not hex.
Also, you need to run in the debugger and you probally need to enable breaking on app generated exceptions (there''s a big long list of exceptions to break on, I beleive it is the last one).
I guess make sure its spelled right, it is case sensitive. My computer with that settings is kind of fragged right now, when it''s restored I''ll take a gander.
make sure youre not releasing a null pointer, e.g. an uninitialized surface.
when i declare com objects, i set them to zero, then in the shutdown check if they exist before releasing them
when i declare com objects, i set them to zero, then in the shutdown check if they exist before releasing them
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement