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

# destroy()

Removes underlying allocations and connections from the USB host object.

## Declaration

```swift
func destroy()
```

## Discussion

Discussion When you no longer need the IOUSBHostObject, call destroy(). This method destroys the connection with the kernel object and deregisters interest on io_service_t. Calling destroy() multiple times has no effect.

## See Also

### Managing the Object Life Cycle

- [IOUSBHostObjectInitOptions](iousbhost/iousbhostobjectinitoptions.md)
- [IOUSBHostInterestHandler](iousbhost/iousbhostinteresthandler.md)
- [ioService](iousbhost/iousbhostobject/ioservice.md)
- [queue](iousbhost/iousbhostobject/queue.md)
