02-03-2006 01:02 PM
02-05-2006 09:08 PM
I didn't find a VI in the palettes called "Sound File Read Open.vi"...I found "Sound File Read.vi" and "Sound File Open.vi"...are you talking about one of those? If so, are you calling the Sound File Open.vi in a loop? If so, are you neglecting to call "Sound File Close.vi" every iteration of the loop? If so, that's your problem...every time you call Sound File Open.vi, it opens a new reference to a sound file, and these references will accumulate in memory over time. I recommend you call the Sound File Open.vi outside the loop, and call Sound File Read.vi inside a loop, and once the loop is done, call Sound File Close.vi. This should prevent any memory build-up of references (since you're only dealing with a single sound file reference).
If my guess above is not correct, please clarify which VI you're having a problem with, and if possible, attach a simple VI that demonstrates the problem.
Good luck,
-D
02-06-2006 08:01 AM
Hi Darren.
The VI in the tool pallete is "Sound File Open", When I place it in my diagram the title is "Sound File Read Open". Remember, the leak only appears when the open file name is invalid. Attached find the use case.
Thank You
Zach
02-06-2006 10:38 AM
Hi Zach,
Thanks for attaching a VI. I agree that this code should not cause memory usage to increase, since you are closing the reference every loop iteration. I will report this issue to LabVIEW R&D and hopefully we will see a fix in the next LabVIEW version. For now, you can workaround the problem by checking the path to see if it is a valid path before attempting to open the sound file.
-D