Hi Motti,
unfortunately there is no such control on the memory allocated by
DOMDocument: all of the nodes and strings used in the DOM tree come
from a memory pool allocated by the DOMDocument, and they can be
freed only by deleting the entire page (and DOMDocument doesn't keep
statistics to check whether an entire page contains only released
nodes). So the only way to release the memory is by releasing the
entire DOMDocument.
Sorry if this is not the answer you would have liked,
Alberto
At 09.36 12/12/2006 +0200, Motti Shneor wrote:
Hello everyone. Happy to join the list.
I use a system that reuses the same xerces::DomDocument for long period,
adding and releasing DomNodes (elements, attributes etc.) continuously.
Although I DomNode->remove()->release() every unneeded node, the memory
taken up by DomDocument seems to ever increase, to the point the program
becomes unusable.
In the docs, it is recommended that I release unused nodes, but it only
is assured that they are actually released when the document is
released. This is not good enough in my situation.
I see that xerces memory manager's "deallocate()" is never called on my
nodes until I explicitly DomDocument *myDoc->release();
I am seeking a way to instruct a DomDocument to actually clear and free
its RELEASED nodes. Something like a partial DomDocoment->release() that
will only clean up its heap from released stuff.
Is it possible? Is there a simple way to do this? What are the prices?
Any ideas?
Motti Shneor
Senior Software Engineer
Orbograph Ltd.
[EMAIL PROTECTED]
http://www.orbograph.com
---------------------------------------------------------------------
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]