Click to See Complete Forum and Search --> : Memory leak?


LaxRoth
July 15th, 2005, 04:57 AM
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:

LaxRoth
July 18th, 2005, 01:38 AM
Can noone help me?

:cry:

JetDeveloper
July 20th, 2005, 11:29 PM
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.

LaxRoth
July 21st, 2005, 02:24 AM
unfortunately i have to use msdev 6.0...

JetDeveloper
July 22nd, 2005, 01:05 AM
Since it's a ugly COM object I think you'll need to do

pXMLDocument->Release();

each time you are done with the document.

ranadhir nag
July 20th, 2006, 05:02 AM
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?

LaxRoth
July 20th, 2006, 05:32 AM
Yes, use newer version of msxml.dll.

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

:thumb:

humptydumpty
July 20th, 2006, 06:00 AM
so you are using Dom Parser.that's good Just Go with This Link this will Help you
http://www.codeguru.com/forum/showthread.php?t=390270&highlight=XML

if still any problem Please let us Know
Thanx

LaxRoth
July 20th, 2006, 06:07 AM
Why should this link help him...i see nothing of interest for his question ?!?