-
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:
-
Re: Memory leak?
-
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.
-
Re: Memory leak?
unfortunately i have to use msdev 6.0...
-
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.
-
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?
-
Re: Memory leak?
Yes, use newer version of msxml.dll.
Or, if you have a larger document, use a sax parser...
:thumb:
-
Re: Memory leak?
so you are using Dom Parser.that's good Just Go with This Link this will Help you
http://www.codeguru.com/forum/showth...&highlight=XML
if still any problem Please let us Know
Thanx
-
Re: Memory leak?
Why should this link help him...i see nothing of interest for his question ?!?