My company uses a this piece of code to delete ALL objects from memory.
But because of the catch(...) I wonder what happens if the destructor of that object fails (AV)? Is it ok to catch everything silently? If the destructor failed, don't we want to know about this?
#define DELNULL(p) \
{ \
if (p) \
{ \
try \
{delete p;} \
catch (...) \
{} \
p = NULL; \
} \
} \