Gareth, you forgot to mention that the first document is still valid after a reset. The parser keeps the document in an internal list until the parser is deleted or the method resetPool is called on the parser.
Do a reset before each parse and smile just like Gareth says unless you REALLY want to kill the document and get the resources back, then call resetPool instead. Mind that resetPool deletes ALL documents created by that parser. If you want to control which documents that gets deleted then you'll have to adopt each parsed document and delete them yourself. / Erik > -----Original Message----- > From: Gareth Reakes [mailto:[EMAIL PROTECTED] > Sent: den 14 juli 2003 19:41 > To: [EMAIL PROTECTED] > Subject: Re: parser->parse() question > > Hi, > > > So, what is my question? What is the status of these nodes "left over" > > from the first parsing? I thought they would be orphaned, but > apparently > > not. > > 1. Am I responsible for releasing them? > > You should call reset between parses. If you do this then the parser will > delete the docs for you. If you don't then things can go bad. > > > 2. If they still see the doc as their parent node, why don't they show > up > > when the node is printed? > > The nodes from the first parse will see the first doc as their parents and > the nodes from the second the second. > > > > 3. Exactly what is the status of these nodes? > > Nodes that have been created but are no longer the parsers responsibility > to delete. > > > Summery - call reset between parses and smile :) > > Gareth > > > -- > Gareth Reakes, Head of Product Development +44-1865-203192 > DecisionSoft Limited http://www.decisionsoft.com > XML Development and Services > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]