It looks to me like you could call the various XercesDOMParser::reset...() and AbstractDOMParser::reset...() methods. Or, to be paranoid and/or lazy, you could use a new parser for each iteration.
________________________________ From: Sree Harsha [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 5:40 AM To: [EMAIL PROTECTED]; c-dev@xerces.apache.org Subject: Please help me out with this code..Can i reuse DOM objects in a while loop?????? /*Can i reuse the DOM objects like XercesDOMParser object in a do... while loop as follows.... or will it cause any memory leaks how to reuse them...*/ do { /*create a source file */ parser_.parse(source); //parser_ is a XercesDOMParser object /*parse the file source*/ /*delete the source file*/ /*what function should i call to reuse parser_ object in the next iteration so that memory consumption reduces */ }while(dwbytes==bufsize); /*some condition*/ -- Regards Sree Harsha Vardhana S.N "When you want something, all the universe conspires in helping you to achieve it." -- Regards Sree Harsha Vardhana S.N "When you want something, all the universe conspires in helping you to achieve it."