NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Leak

Goood morning,

For my work I have created a very long sequence for testing our system. During the sequence there are a lot of .NET invocation from a DLLs. By observing the RAM of my PC I noticed that the memory allocated for the sequence process continuously increasing in time (for a 4 hours and 30 minuts test the increment is about 180 MB). For trying to free the memory I have tried both methods with the same result:

 

  1. Flagging the dispose in each .NET invocation
  2. Creating a reference object to which refer all the .NET invocation and, at the end of the process, assigning the value Nothing.

Since the two methods give me always an increase of memory used, I am very curios to understand how TestStand manage the RAM in particular when a .NET is used.

Moreover, I have some other questions:

 

  1. someone knows if the two methods above are equivalent or there is one better than the other?
  2. Is Nothing really a value that allows memory to be released?

For avoiding any doubts, the DLLs used has been checked a lot and all the possible issues that can generate memory leak have been solved.

 

Thank you for the help and merry Christmas!

 

Best Regards,

Andrea

0 Kudos
Message 1 of 3
(1,216 Views)

Nothing is a keyword that does release objects.

 

My guess is that you might be seeing the memory go up because your resultlist is getting larger.  What steps are you recording the results for?  Is it everything?  Try disabling that where it's not needed.

 

You can also use On-The-Fly reporting to keep your memory down.  https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9LdSAK&l=en-US

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(1,110 Views)

Thank you for your kind answer!

 

After some research i think that is the resultlist to occupy memory. In my sequence I have different levels of details in the creation of the Report. So the solutions that I have found are the On-the-Fly mode and the Offline Report Generation. Now I will implement this two ways after some studies on NI white papers. 

 

Do you have any advice on these two solutions?

 

Best Regard and happy new year!

Andrea

0 Kudos
Message 3 of 3
(1,087 Views)