Memory leak?

Hi, i'm trying to load an xml document from C++ with:

MSXML::IXMLDOMDocumentPtr pXMLDocument (__uuidof (MSXML::DOMDocument)); // main document parsed

hr = pXMLDocument->loadXML (BSTRTemp); /* trying parse string, if success, we have doc object*/

this method uses offensive memory. i have xml files that are about 100MB size.

i feel the function does not clear the memory. anyone an idea?
if i load 3 times the same file, my memory is full.

suggestion? is there a free method or something?

thank you,

lutz

:wave:
[603 byte] By [LaxRoth] at [2007-11-19 11:10:51]
# 1 Re: Memory leak?
Can noone help me?

:cry:
LaxRoth at 2007-11-10 3:27:29 >
# 2 Re: Memory leak?
If you use Visual Studio .net there is a nice XMLDocument class with much nicer syntax that avoids any pointers, COM junk, and memory leaks.
JetDeveloper at 2007-11-10 3:28:29 >
# 3 Re: Memory leak?
unfortunately i have to use msdev 6.0...
LaxRoth at 2007-11-10 3:29:27 >
# 4 Re: Memory leak?
Since it's a ugly COM object I think you'll need to do

pXMLDocument->Release();

each time you are done with the document.
JetDeveloper at 2007-11-10 3:30:24 >
# 5 Re: Memory leak?
sorry to re-energize this old chain.But i am gettign heaps load of memry leak in loadxml.Did you get teh solution to your question?
ranadhir nag at 2007-11-10 3:31:23 >
# 6 Re: Memory leak?
Yes, use newer version of msxml.dll.

Or, if you have a larger document, use a sax parser...

:thumb:
LaxRoth at 2007-11-10 3:32:33 >
# 7 Re: Memory leak?
so you are using Dom Parser.that's good Just Go with This Link this will Help you
http://www.dev-archive.com/forum/showthread.php?t=390270&highlight=XML

if still any problem Please let us Know
Thanx
humptydumpty at 2007-11-10 3:33:27 >
# 8 Re: Memory leak?
Why should this link help him...i see nothing of interest for his question ?!?
LaxRoth at 2007-11-10 3:34:30 >