Do i need to release COM objects in Directx11 if they are set to NULL?
For example in my code i have
Lets say an error occurs so my program calls my shutdown function and d3d11Device never get set a new value should it still be released?, because when i dont have the cleanup set up like that i get access violation which i presume are from d3d11Device being NULL
For example in my code i have
//Variables initialization
ID3D11Device* d3d11Device = NULL;
//in my shutdown function
if(d3d11Device!=NULL){d3d11Device->Release();}
Lets say an error occurs so my program calls my shutdown function and d3d11Device never get set a new value should it still be released?, because when i dont have the cleanup set up like that i get access violation which i presume are from d3d11Device being NULL