Method: LIBUSB::DevHandle#close

Defined in:
lib/libusb/dev_handle.rb

#closeObject

Close a device handle.

Should be called on all open handles before your application exits.

Internally, this function destroys the reference that was added by LIBUSB::Device#open on the given device.

This is a non-blocking function; no requests are sent over the bus.



43
44
45
46
47
48
# File 'lib/libusb/dev_handle.rb', line 43

def close
  @bulk_transfer.free_buffer if @bulk_transfer
  @interrupt_transfer.free_buffer if @interrupt_transfer
  @control_transfer.free_buffer if @control_transfer
  Call.libusb_close(@pHandle)
end