> Does the parser have to remain instantiated to continue using the document that it parsed? That's how the "latest" design is (latest nightly build with latest fixes, not 1.5.1, Xerces-C 1.5.1 has a memory leak bug that the document somehow still alives even the IDOMParser is deleted).
Tinny "Houle, Dennis W" wrote: > Tinny, > Thanks for the clarification. I was planning on deleting the parser after I > finished parsing a document and then process the document, deleting it when > finished. Is this really not possible? Does the parser have to remain > instantiated to continue using the document that it parsed? > > Thanks much. > > -Dennis > > -----Original Message----- > From: Tinny Ng [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 03, 2001 9:17 AM > To: [EMAIL PROTECTED] > Subject: Re: Possible memory leak in > IDOM_Element::getElementsByTagName()???? > > If you manually create a DOM document in memory, e.g. > IDOM_Document* myDocument = > IDOM_DOMImplementation::getImplementation()->createDocument(); > delete myDocument; > then you need to explicitly delete the document object. > > But if you just retrieve the document object after parsing an instance > document, > e.g. > IDOMParser *parser = new IDOMParser; > parser->parse(gXmlFile); > IDOM_Document *doc = parser->getDocument(); > delete parser; > > memory will be automatically taken care of by the IDOM parser when the > IDOMParser is deleted. > > Tinny > > "Houle, Dennis W" wrote: > > > Rich, > > I can respond to your IDOM memory questions as an IDOM user, not a > developer > > of the IDOM API. My understanding is that the IDOM_Document manages the > > memory needs of its nodes/elements. That is why you never delete pointers > > returned from IDOM operations (e.g. getAttribute, item, getFirstChild, > etc.) > > All of the memory used by an IDOM_Document and its nodes/elements is > > released when you are finished with the IDOM_Document and delete its > > pointer. > > > > Also, be sure you are using a recent release, the folowing > > IDDeepNodeListImpl bug was fixed in early August: > > * Revision 1.5 2001/08/07 17:01:09 tng > > * [Bug 2676] IDOM: pure virtual called in IDDeepNodeListImpl::item() . > > > > Any clarifications or corrections from an IDOM developer would be most > > welcome! > > - Dennis > > > > -----Original Message----- > > From: Christy, Rich [mailto:[EMAIL PROTECTED]] > > Sent: Monday, October 01, 2001 9:43 AM > > To: '[EMAIL PROTECTED]' > > Subject: Possible memory leak in > > IDOM_Element::getElementsByTagName()???? > > > > I trying to determine if this is a problem or not. But each time I call > > getElementsByTagName(), it works its way down to > > IDDeepNodeListImpl::getDeepNodeList() where memory is allocated to and > > inserted into the node list pool. Purify claims a memory leak is > occurring. > > I cannot find any where in the logic where IDDeepNodeListPool::removeAll() > > is called. Am I just missing something or is this a bug. I've added a > call > > to XMLPlatformUtils::Terminate(), but that doesn't seem to make a > > difference. > > > > thanks > > > > Rich Christy > > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > > 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] > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
