Thread View: borland.public.delphi.language.delphi.general
1 messages
1 total messages
Started by JavaBeans
Tue, 14 Dec 2010 04:59
IXMLDocument only releases memory when app terminates
Author: JavaBeans
Date: Tue, 14 Dec 2010 04:59
Date: Tue, 14 Dec 2010 04:59
16 lines
2191 bytes
2191 bytes
I am using the IXMLDoucment interface to parse an XML document. The problem is it appears to be quite a memory hog; using up to 500MB to parse a large document. If I watch the Windows Task manager, I can see memory being consumed as the document is loaded. This memory is only released again when my Delphi app terminates. I have read up on how it is an interface object and if it has no parent and is assigned to nil it will be automatically freed once no further references to it exist, or that it will be freed if it is created on a form when the form is destroyed. I have tried manually creating it and assigning it to nil, and I have tried creating a form with an XML Document component on it and releasing the form but the memory still isn't freed at this time. (In both cases I am using local variables in a method for the XML Document and the form.) Are there any suggestions as to how I can free the memory as soon as I have finished using the interface?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads