Memory Diagnostics

Most applications use the C++ new operator to allocate memory on the heap. The Microsoft Foundation classes provide a special Debug version of new that inserts extra control bytes in allocated memory blocks. These control bytes, together with the run-time class information that results from CObject derivation, allow you to analyze memory allocation statistics and detect memory block bounds violations.

A memory dump can include the source filename and the line number of the allocated memory, and, in the case of objects from CObject-derived classes, the name of the class and the output from its Dump function.