01-06-2009 10:47 PM
I have a LabView application (.exe on windows XP) that acquire data and display a graph of them. If I let run the acquisition, the memory usage (in the Task Manager) starts at ~60MB and is increasing slowly with the number of acquisitions. When I minimize the application window, the memory usage drops to a 3 MB. When I reopen the window, the memory usage will jump to ~6MB and if I restart the acquisition, it increase rapidly to ~20MB and then slowly increase as before.
I have tried to remove the graph but the behavior is the same. Running in the development environment, the minimize window has no effect on the memory usage.
Is there someone who knows what LabView and Windows are doing with memory when an application is minimized? It may help to find the source of my memory leak
Pierre Cottin
INO
Solved! Go to Solution.
01-07-2009 02:46 PM
Hi Pierre,
It sounds like the Windows user interface (UI) thread is requiring a lot of the CPU to update the front panel of your VI. When you minimize the screen and the UI doesn't need to update, you see a much lower CPU usage. So, there are a couple of changes you can probably make in your code to make the UI require less CPU to update. What types of front panel objects is your code using? If indicators are updating within a loop, can you change the code to make them update less often?
01-07-2009 10:13 PM
Hello LaRisa,
It's actually a question of memory and not CPU. In the mean time, I have found that this behavior is actually a feature of windows. Take a look at this thread for more details: http://bytes.com/groups/net-c/232400-memory-usage-minimize-windowstate
The problem is that it doesn't help me with my memory leak. Too bad!
Pierre Cottin
INO
01-09-2009 09:22 AM
Hello Pierre,
I would try contacting Microsoft support as the issue seems to lie with Windows. Please let us know if you are able to solve the issue.
01-09-2009 09:45 AM