Hello,
Using Xerces 1.5.1
MS VC++ 6.0 sp5
window 2000 OS
This I found to be very strange. In my testing to be able to open multiple
xml files I found a memory leak that occurs once the DOM_Document is gotten
from the DOMParser. Even though the DOMParser is reset and/or deleted, and
the DOM_Document is reset using the DOMParser resetDocument, memory is still
held. The lions share of memory used by the DOMParser, I might add.
The code I used to test this was simple:
int main(int argc, char* argv[])
{
XMLPlatformUtils::Initialize();
DOMParser* parser = new DOMParser;
parser->setValidationScheme(DOMParser::Val_Auto); // validate if dtd
present
parser->setIncludeIgnorableWhitespace(false) ;
parser->parse("..\\dat\\persxml.dat") ;
DOM_Document& theDoc = parser->getDocument() ;
parser->resetDocument() ;
parser->reset() ;
parser->parse("..\\dat\\persopts.xml",true) ;
delete parser ;
XMLPlatformUtils::Terminate();
return 0 ;
}
Keep in mind that even after the delete memory was still allocated.
I searched the archives but found no solution to this problem.
Any assistance is greatly appreciated.
Regards,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]