static LPDIRECT3DDEVICE9 g_pDevice = 0;
If( pDevice != g_pDevice) // If Device change Reset required and Then It will not be the same
{
g_pDevice = pDevice;// make them the same
if(shkronjatedumdumit != 0)// If it is null it not reset
{
shkronjatedumdumit->Release();// Release it.. no memory Leaks now
shkronjatedumdumit = 0;//Make it Null as it is a pointer
}
//Recreate here and go on
}