unique_ptr deletes target pointer when variable scope ends.
For variable "device" this is the whole main() function.
So Device is destroyed after main() is finished.
Device descructor is calling libusb_close. According to documentation
no libusb function is allowed to be called after libusb_exit().
unique_ptr deletes target pointer when variable scope ends. For variable "device" this is the whole main() function. So Device is destroyed after main() is finished. Device descructor is calling libusb_close. According to documentation no libusb function is allowed to be called after libusb_exit().
Fixes #195