Hi,

this is expected behavior. The rational is that recycling the pointer/memory is expensive in comparison to the likelihood of it being required.

Gareth

Hua-Ying Ling wrote:

Hi, I find that if I run the code below in a tight loop, the memory
footprint will keep growing unless I call document->release(). Is
this expected behavior or it is a leak? If this is expected behavior
is it possible to ask Xerces to release unused memory without having
to reparse the xml file?


DOMNode* node = someNode;
DOMTreeWalker *walker;
DOMDocument *document = parser->getDocument();

walker = document->createTreeWalker(node, DOMNodeFilter::SHOW_ELEMENT,
NULL, false);
walker->release();

Thanks
Hua-Ying



--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to