As everyone knows, the Visual C++ runtime marks uninitialized or just freed memory blocks with special non-zero markers. Is there any way to disable this behavior entirely w
Why not create your own #define and get in the habit of using it?
I.e.
#define SafeDelete(mem) { delete mem; mem = NULL; } #define SafeDeleteArray(mem) { delete [] mem; mem = NULL; }
Obviously you can name it whatever you like. deleteZ, deletesafe, whatever you're comfortable with.