genicam / harvesters

Image Acquisition Library for GenICam-based Machine Vision System
Apache License 2.0
500 stars 86 forks source link

Added revoking of buffers without releasing datastream and functionality to reuse previously announced bufferes #426

Open eugene-mcn opened 11 months ago

eugene-mcn commented 11 months ago

Found an issue where repeated ia.start() and ia.stop() calls would allocate imcreasing amounts of memory. Appears to be from a combination of ia._create_ds_on_connection = True and no call to data_stream.revoke_buffer() being made at acquisition stop.

Have added _reuse_buffers flag and check to announce or revoke buffers if required number of buffers changed.

No tracking of which datastreams own which so will only work with single datastream cameras