xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Wicki <patrick.wi...@wsl.ch>
Subject Memory Trouble in DOMNode::getTextContent
Date Fri, 05 Mar 2004 15:41:43 GMT
Hello,
I still have memory trouble using DOMNode::getTextContent with XERCES Ver. 
2.3.0!
The following loop I created runs about 1400 times on my machine, and 
shortly after that it crashes! Does anybody see what causes the leak!?

(I always ask for the same tag ("aufopn_1") to make it as easy as possible!)

Regards and thanks for the hint before
Patrick


void get_sql_stat_from_xml_test()
{
   DOMNodeList* sql_statements;
	
   //Allocate XMLCh for Tag
   static XMLCh* pOutputEncoding[1];

   pOutputEncoding[0] = XMLString::transcode("aufopn_1");

   //1486 times ok, 1487 time it crashes!
   for(int i=0; i<1486; i++){
		sql_statements = 
get_xml_document()->getElementsByTagName(pOutputEncoding[0]);
		char* pStr=XMLString::transcode(sql_statements->item(0)->getTextContent());
         XMLString::release(&pStr);

   }

    //Release
    XMLString::release(&pOutputEncoding[0]);
}


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Mime
View raw message