08-02-2024 11:07 PM
Hello,
I'm trying to resolve a memory growth (or leak) issue. I know which VI is causing it. I did some trial and error by disabling each part of the VI and observing how memory usage changes. Then I noticed that even when I disabled the entire code inside the VI except the controls and indicators, memory was still growing. Only when I disabled the entire VI icon from its caller VI, memory was stable.
I thought the culprit must be this 2D waveform array input. It is coming from Read Multiple Elements from Stream. Most of the time (maybe 99+% of the time), there is only one row. If the loop is delayed for some reason, there may be two rows, which I don’t want to miss. The number of columns is fixed at 64.
It is the Process DAQ Data VI in this loop below.
I took some array manipulation loops out of the Process DAQ Data VI so that there is no 2D waveform front panel control. It did not help.
When I connected the 2D waveform input to a dummy constant value, then memory was stable.
Any insight to resolve this problem will be appreciated.
Solved! Go to Solution.
08-03-2024 07:28 AM
I tried using Read Single Element from Stream twice per loop instead and the memory issue disappeared.
So I can use 2D waveform arrays as long as their row number is predetermined.