I am trying to run a number of USB cameras at very low frame rate of one picture every 5+seconds. The coding is fairly simple but there is a memory leak that after several thousand frames memory is full and LV crashes.
Attached is a basic VI fragment that shows the leak (the buttons and case statements are used in the main program to turn cameras on/off). When run, LV adds about 300K per loop cycle. No matter how I initialize and destroy the references (inside or outside the loop), the leak persists. Removing the snap function cures the leak.
The USB driver is Windows based. I could not use the LV USB3 driver for some reason and the camera defaults to the windows driver. The software is LV 2019 with Vision 19.5 under Windows 7 professional 64 bit. Likely, LV configures a buffer for the camera that changes and is never destroyed. Any thoughts?