Hehe sorry, I didn't get the reference
[edit]
After some work I traced it down to this and ammended as per the comment
//This is called every frame
if(!FAILED(d3dDevice->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO,&surfaceBackbuffer)))
{
DstRect.left=0;
DstRect.top=0;
DstRect.right=nWindowWidth;
DstRect.bottom=nWindowHeight;
if(FAILED(d3dDevice->StretchRect(surfaceApplication,NULL,surfaceBackbuffer,&DstRect,D3DTEXF_LINEAR )))
return 141;
// ADDED THIS TO THE CODE
if(surfaceBackbuffer)
{
surfaceBackbuffer->Release();
surfaceBackbuffer=NULL;
}
}
If anything still looks nasty here, please let me know