Original Post
I have 4 directdraw objects in my project:
LPDIRECTDRAW7 m_lpMainDD; //Main DirectDraw object LPDIRECTDRAWSURFACE7 m_lpDDSurfacePrimary; //Back Surface LPDIRECTDRAWSURFACE7 m_lpDDBackSurface; //Primary Surface LPDIRECTDRAWCLIPPER m_lpDDClipper; //Clipping objectand my shutdown code looks like this:
if (m_lpDDBackSurface) {
m_lpDDBackSurface->Release();
m_lpDDBackSurface=NULL;
}
if (m_lpDDSurfacePrimary) {
m_lpDDSurfacePrimary->Release();
m_lpDDSurfacePrimary=NULL;
}
if (m_lpDDClipper) {
m_lpDDClipper->Release();
m_lpDDClipper=NULL;
}
if (m_lpMainDD) {
m_lpMainDD->Release();
m_lpMainDD=NULL;
}
But I get a debug output when my program ends saying:
"Memory still allocated! Alloc count = 28"
then a big list of memory addresses which don''t help 1 bit. Am I doing something wrong with my shutdown code? and is there an easy way to see what surfaces and object are not released (like getting an accual variable name would be nice)