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
When you create a pointer, explicity initialize it to NULL. Likewise after a delete. Depending on the value of uninitialized data (except in a few specific cases) is asking for trouble.
You can save yourself a lot of headaches by using a smart pointer class (such as boost::shared_ptr) which will automatically deal with whether a pointer is initialized or not.