Memory Values
If you're using the debug heap, memory is initialized and cleared with special values.
Typically MFC automatically adds something like the following to your .cpp files to enable it:
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
While using the debug heap, you'll see the values:
Value | Usage |
---|---|
0xCDCDCDCD | Allocated in heap, but not initialized |
0xDDDDDDDD | Released heap memory. |
0xFDFDFDFD |
"NoMansLand" fences automatically placed at boundary of heap memory. Should never be overwritten. If you do overwrite one, you're probably walking off the end of an array. |
0xCCCCCCCC | Allocated on stack, but not initialized |