Hey,

Hua-Ying Ling wrote:

On Tue, 19 Oct 2004 10:15:06 +0100, Gareth Reakes
<[EMAIL PROTECTED]> wrote:


Hi,

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



That explains it. I've got a program where I'm accessing the the xml file throughout the entire runtime of program. The problem I'm running into is the memory footprint keeps growing. For a smaller xml file, releasing the parser and reparsing would not be a problem but this is a one megabyte and growing xml file. Any suggestions on how to approach this problem?



Three options spring to mind:

i) Clone the document into another document and release the first (although memory consumption is still an issue with 2 docs in memory)
ii) Implement the release
iii) Implement a new memory scheme that actually allows releasing of memory.


iii is the most interesting :) I have thought about it in the past, but its a lot of work. I would stick with ii, its not too much work and its fairly strait forward. I would be happy to give you some pointers if you get stuck.

Gareth

--
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