ofxOpenNI icon indicating copy to clipboard operation
ofxOpenNI copied to clipboard

hardware usb connection isn't properly closed

Open wouterverweirder opened this issue 12 years ago • 0 comments

I noticed an issue with the hardware shutdown code. The claimed usb device isn't properly released, which causes issues when you create a new instance of the hardware layer without shutting down. Fix would be:

  • initialize the dev pointer to zero in the constructor.

  • adjust the shutdown code to contain the following:

    if(dev != 0) { libusb_close(dev); libusb_release_interface(dev, 0); } libusb_exit(ctx);

this closes & releases the dev handle properly

wouterverweirder avatar Oct 15 '12 15:10 wouterverweirder