Hi, 
    Look at following simple code block: 
--- 
    XercesDOMParser *parser = 0; 
    try 
    { 
        XMLPlatformUtils::Initialize() 
        parser = new XercesDOMParser(); 
    } 
    catch (...) 
    { 
        cout<< "Unknown error detected in parse()"<<endl; 
    } 

    delete parser; 
    XMLPlatformUtils::Terminate(); 
-- 
In my simple test application's main function, this block runs well. 
But when I put this block in my business application's XML parsing 
function, it fails with message 
"memory corrupted...". And the error occurs only when processing the 
delete statement. 
Though this application is multi-threaded, I think the function is 
executed in a single thread. -- would it be a problem if this function 
is executed in multiple theads? 
Without the block, the function runs well. 
So, what could be the reason of the error? 
I studied the default MemoryManager, and found nothing special. 
I really have no idea.

Regards,
Wentao

Reply via email to