C:/quickbuild-1.2.13/working/root/Docs/TGEA_Offline_Docs/checkouts/engine/source/core/util/safeDelete.h File Reference


Defines

#define SAFE_DELETE(a)   {delete (a); (a) = NULL; }
 Safely delete an object and set the pointer to NULL.
#define SAFE_DELETE_ARRAY(a)   { delete [] (a); (a) = NULL; }
 Safely delete an array and set the pointer to NULL.
#define SAFE_DELETE_OBJECT(a)   { if( (a) != NULL ) (a)->deleteObject(); (a) = NULL; }
 Safely delete a SimObject and set the pointer to NULL.
#define SAFE_FREE(a)   { if( (a) != NULL ) dFree ((void *)a); (a) = NULL; }
 Safely free memory and set the pointer to NULL.
#define SAFE_FREE_REFERENCE(a)   { if((a) != NULL) (a)->freeReference(); (a) = NULL; }
 Safely free a reference to a Message and set the pointer to NULL.
#define SAFE_DELETE_MESSAGE   SAFE_FREE_REFERENCE
 Synonym for SAFE_FREE_REFERENCE().