I'm working on a basic libusb Visual C++
application in vs2013, which has a Class that calls libusb_get_device_list(ctx, devices)
3 times; once in the constructor, and twice in two functions for printing devices and device descriptions. Each time I call libusb_free_device_list(devices, 1)
to release the devices. In the Destructor, I call
libusb_close(deviceHandle);
libusb_exit(ctx);
Nothing breaks, but the libusb_exit(ctx) spits out the warning: libusb: warning [libusb_exit] some libusb_devices were leaked
If I only call libusb_get_device_list(ctx, devices)
once, the warning doesn't show.
Has anyone had the same issue and found a way to resolve it?
NOTE:
Whether I use the same instance of libusb_device** or three unique ones, the problem persists