Help! I'm Leaking!
I have a serious memory leak (around 2MB wafter exiting the programm) and I pinpointed it to me using textures.
I load them with
D3DXCreateTextureFromFile( m_pd3dDevice, strTextureSource, &m_pTexture);
at the beginning, use SetTexture( 0, NULL) after using them while rendering and set m_pTexture = NULL before exiting the programm.
Should I release m_pTexture? (if yes, how? m_pTexture->release() doesn''t seem to exist:\
I tried to delete( m_pTexture) but of course it only gift me with an access violation.
Any help?
m_pTexture->Release()?
---visit #directxdev on afternet <- not just for directx, despite the name
Sorry .. forgot to say what type the variables were ...
LPDIRECT3DDEVICE8 d3dDevice
char* TextureSource
LPDIRECT3DTEXTURE8 m_pTexture
I thought DX8 Textures might be similar to vertex buffers and that you had to release them. Being desperate to find a way to close the leak I really tried a lot of nutty things (none of which worked by the way)
[edited by - Sammy70 on March 30, 2002 10:06:27 AM]
LPDIRECT3DDEVICE8 d3dDevice
char* TextureSource
LPDIRECT3DTEXTURE8 m_pTexture
I thought DX8 Textures might be similar to vertex buffers and that you had to release them. Being desperate to find a way to close the leak I really tried a lot of nutty things (none of which worked by the way)
[edited by - Sammy70 on March 30, 2002 10:06:27 AM]
Just ~solved~ my problem. It seems like my DX setup is completely screwed. After increasing the debug level of DirectX I''m getting DDHELP crashs on KERNEL32 everytime I try to run any DX programm. I let the programm run in debugger mode on another computer and didn''t get any memory leak at all.
Oh well ... A fresh Windows installation was due I guess
Oh well ... A fresh Windows installation was due I guess
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement