.. _disconnect: Disconnect ========== .. code-block:: python disconnect(self, device) **Description** This method disconnects from the specified device, closing the connection and releasing resources. **Parameters** * `device (DevicePointer)`: The device pointer **Returns** * `int`: Error code if any else 0 **Raises** * `Exception`: If the device handle is mismatched **Usage** .. code-block:: python :linenos: device_interface.disconnect(device_ptr)