Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualIncidentRay

Posted 21 March 2013 - 10:52 PM

template void safe_delete(T* x) { delete x; x = NULL; }

 

This should probably be safe_delete(T*& x) as otherwise you're only assigning the local variable to NULL.


#1IncidentRay

Posted 21 March 2013 - 10:52 PM

template void safe_delete(T* x) { delete x; x = NULL; }

 

This should probably be safe_delete(T*& x) as otherwise you're only local variable to NULL.


PARTNERS