I want to change the way some of my programs work.  Presently a
program gets started to handle a particular XML transaction type.
When the program is done, it goes away.    There's a lot of start-up
and initialization time that can be eliminated here, so now I want to
have a small pool of programs handling that XML type so my question is
about what has to be done to make sure memory doesn't build up as XML
transactions come in.  It is as simple as just calling
resetDocumentPool() when each XML has been handled?  What is the
one-time stuff you have to do?  For instance I don't think you need to
call the initialization stuff everytime and create a new parser - do
you?

// Do Xerces DOM/SAX initialization one time
DOMImplementation* impl =
DOMImplementationRegistry::getDOMImplementation(X("Core"));
...
while (xmlFile = get_next_xmlFile_to_process)
    parser->parse(xmlFile);
    ...
    parser->resetDocumentPool();
done


-- 
Kelly Beard

Reply via email to