If _momDebug() returns an error it is always fatal, because it indicates that internal structures have been destroyed. When this is the case, an application becomes unpredictable and should be terminated.
Function _momDebug() Foundation
Tests for errors in dynamic memory objects.
XPPAPIRET _momDebug();
Returns XPP_ERR_CORRUPTION if memory objects are found whose structures have been destroyed. Otherwise the return value is NULL.
This function serves only as an aid when debugging C functions. It tests the structure of all dynamic memory objects and determines whether any writes beyond the limit of an object have occurred. It does not test whether the content of memory objects or container objects are correct.
Dynamic memory does not only contain the C API generated memory objects and containers, but also Xbase++ generated objects.
/*
Test memory for errors
*/
#include "xppcon.h"
if (_momDebug() != 0)
{
/* Outputs debugging information and program terminates. */
}
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.