This function validates the free memory pool and prints error messages as required.
If the function detects no memory corruption, it prints nothing.
All memory blocks currently allocated on the heap are checked, including those allocated by new but not those allocated by direct calls to underlying memory allocators, such as the malloc function or the GlobalAlloc Windows function. If any block is found to be corrupted, a message is printed to the debugger output.
If you include the line
in a program module, then subsequent calls to AfxCheckMemory show the filename and line number where the memory was allocated.
If your module contains one or more implementations of serializable classes, then you must put the #define line after the last IMPLEMENT_SERIAL macro call.
This function works only in the Debug version of MFC.