If you release a DOM document, all the memory it has
allocated for elements and so on is also released. If this were not true, your
process size growth would not be limited by the size of the largest document;
instead, the process would grow continuously. However, whether this memory will
be returned to the operating system is beyond Xerces' control; it's up to the
underlying memory allocation system.
You might want to try an experiment. Create a C++ program
that allocates and frees a large amount of memory. Does the process size
decrease after the memory is released? If so, there's a problem in Xerces or
your use of it. If not, what you're seeing is a characteristic of your system's
memory management.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 4:04 AM
To: [EMAIL PROTECTED]
Subject: Xerces consumes memory
Hello list,
I am parsing xml-files consuming 1 GB of memory in a process doing also other things.
The process can't be restartet. What I see is, that the process grows to the maximum parser/doc size and will never
free it's memory as long the process runs. Is there any function to reorganize the memory used by a document ?
Regards Michael