02-27-2014 10:16 AM
I have developed a code and found that there was memory leak after running continuously for 5-6 hours. This would force me to restart the software. At first, I thought it was something in my source code. Investigating further, I realized that when I hid the tab with the file path indicator, the memory doesn't leak. This occurs only when the file path doesn't fit the indicator. I replaced it with a string instead and the memory leak problem went away. Has anyone experienced a similar problem? I couldn't reproduce the problem in a separate VI with only the system path indicator truncated.
02-28-2014 03:20 PM
Hi SumTumWong,
Are you still having the memory leak problem? Can you please provide me with some more information on what are you doing? Are you opening a reference with out closing it? If you have a loop that opens a reference you need to close the reference every loop iteration. Are you using DAQmx? Here is a document on how to prevent memory leak if you are using DAQmx.
What Can I Do to Prevent Memory Leaks in NI-DAQmx?
http://digital.ni.com/public.nsf/allkb/BAF29EE03747EE4B86256E9700541436
Warm Regards,
William Fernandez
Applications Engineering
National Instruments
02-28-2014 03:36 PM
William,
Thanks for the reply. After replacing the system file path indicator with a string indicator, the memory leak went away. My application has been running at a steady memory now (it has actually declined from when it started). I am not opening references within that VI nor am I using DAQmx within that VI. I am doing that in other subVIs, but the memory leak occurs in the vi containing the file path indicator. I find it bizarre that a file path indicator would cause such memory leakage over time.
Thanks,
SumTumWong
02-28-2014 03:47 PM
I find it bizarre that a file path indicator would cause such memory leakage over time.
Yes we find it odd to which is why we'd appreciate it if you helped up reproduce it or posted some code that shows the issue.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord