LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

memory leak by XML

Solved!
Go to solution

Hello all,

 

I want to save some test results on my system into an XML file. It works correctly, the file is OK. But every time when I run my LogResultsXML(), the used memory increases. I haven´t found the solution in the similar thread from don. I think I use  the CVIXMLDiscardElement and CVIXMLDiscardDocument correctly, please check if I am right.

 

Attached you find a text file with the complete code of my function.

 

I appriciate any help, thanks in advance!

MB

0 Kudos
Message 1 of 3
(3,920 Views)
Solution
Accepted by topic author mitulatbati

Hello MB,

 

There were just a couple places that were missing a call to CVIXMLDiscardElement.  I have attached a slightly modified (so that I could build it) version of your source that has the required CVIXMLDiscardElements denoted by a long string of ////...   

 

I just thought that I would also mention that in CVI 9.0 the new resource tracker makes finding leaks a very simple excercise.  Once I could build and run your code, I could see exactly where the leaks were coming from, just by setting the debugging level to extended.  For more information, check out this link.

 

Let me know if you have any questions!

 

NickB

National Instruments 

Message 2 of 3
(3,900 Views)

Hello Nick,

 

many thanks for your reply! Really I have omitted some discarding...

It is a great idea in 9.0 to track memory leaks, but I have 8.0 Base. I have to live with it.

 

regards

MB

0 Kudos
Message 3 of 3
(3,896 Views)