1.

Why Does Deleting A Transcoded String Result In Assertion On Windows?

Answer»

Both your application PROGRAM and the Xerces-C++ DLL must use the same DLL version of the runtime library. If either statically links to the runtime library, this problem will still OCCUR.

For a Visual Studio build the runtime library setting MUST be "Multithreaded DLL" for release builds and "Debug Multithreaded DLL" for debug builds.

To bypass such problem, instead of calling operator delete[] directly, you can use the PROVIDED function XMLString::release to delete any string that was allocated by the parser. This will ENSURE the string is allocated and deleted by the same DLL and such assertion problem should be resolved.

Both your application program and the Xerces-C++ DLL must use the same DLL version of the runtime library. If either statically links to the runtime library, this problem will still occur.

For a Visual Studio build the runtime library setting MUST be "Multithreaded DLL" for release builds and "Debug Multithreaded DLL" for debug builds.

To bypass such problem, instead of calling operator delete[] directly, you can use the provided function XMLString::release to delete any string that was allocated by the parser. This will ensure the string is allocated and deleted by the same DLL and such assertion problem should be resolved.



Discussion

No Comment Found