DirectX shuttingdown on failure.

Started by
-1 comments, last by Josheir 7 years, 6 months ago

Hi, may I get some help please?

For shutting down a game does this look alright using the conditions:

if(lpdikey){

lpdikey->Unaquire();

lpdikey->Release();

}

if(lpdi)

lpdi->Release();

Now what happens if there is an error with the direct input or direct draw setting one of them up and it calls this shutdown, will the Releases (and Unacquire) still always be effective or can the error leave it in a non null state that doesn't release and unaquire properly?

...And if I am working with a bitmap and it fails does my safe delete always work :

SAFE_DELETE { if (p) {delete(p); (p) = NULL;}}

or can it fail in a non null state that doesn't delete properly?

Thank you,

JoshuaE

This topic is closed to new replies.

Advertisement