---
title: "destroy(options:)"
framework: iousbhost
role: symbol
role_heading: Instance Method
path: "iousbhost/iousbhostobject/destroy(options:)"
---

# destroy(options:)

## Declaration

```swift
func destroy(options: IOUSBHostObjectDestroyOptions = [])
```

## Discussion

Discussion Removes underlying allocations of the IOUSBHostObject object along with user client Extends destroy to take an options to modify the destroy behavior.  Currently only the IOUSBHostObjectDestroyOptionsDeviceSurrender is defined to support surrendering ownersip of the kernel service.  To be used when accepting the kUSBHostMessageDeviceIsRequestingClose message.
