Wednesday, April 19, 2006

ALL: MSXML Memory Leaks

I recently ran into a problem with MSXML and memory leaks.  If you repeatedly call it from within FoxPro with many SelectNodes() in there you'll certainly run into a problem.  Go with the MSXML6 or higher where it doesn't have nearly as many memory leaks.  It's documented on MSDN, but was not easy to find. 

1 comment:

Anonymous said...

pointer p = pDoc->selectNodes(...)
... do some code
if at the end we call p->Release();
An unhanded exception is begin thrown. No try catch block helps.

This surely causes memory leaks. I have tested at my application that constantly uses loops on MSXML DOM Document.

Best wishes.