Hi,

You got to set the debug option / language to Multi Threaded (no debug). It
should work. I had the same issue and got it fixed by doing the above.

Thanks
SP




Hao Ling <[EMAIL PROTECTED]> on 02/15/2000 09:28:14 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Suresh Purusothoman/CIMG/CVG)

Subject:  problem with DOMPrint example




Hi,

When I use the release version of Xerces-C++ (Xerces-C_1_0_1-win32 or
the new xerces-c_1_1_0_d05-win32), the DOMPrint sample will abort with an
error message:
****************************************
Debug Assertion Failed!

program: ........\bin\DOMPrint.exe
File: dbgdel.cpp
Line: 47

Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
****************************************

This run-time error is disappear when I comment out the "delete"
instruction in the function "ostream& operator<<(ostream& target, const
DOMString&s)". That is the function is like

ostream& operator<<(ostream& target, const DOMString& s)
{
    char *p = s.transcode();
    target << p;
//    delete [] p;
    return target;
}

However, when I use the source files to build the Xerces and all of its
samples (using Xerces-C-src_1_0_1 and xerces-csrc_1_1_0_d05), the DOMPrint
sample runs very well without any change.

Can anyone tell me why this is happen, and how to run the sample without
commenting out the "delete" instruction. (I wonder there will be memory
leak when I omit the "delete" instruction.)

Thanks,
Hao Ling







Reply via email to