Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak with USB camera

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?

 

 

 

0 Kudos
Message 1 of 1
(1,601 Views)