---
title: cancel()
framework: applearchive
role: symbol
role_heading: Instance Method
path: applearchive/archivebytestreamprotocol/cancel()
---

# cancel()

Cancels stream operations.

## Declaration

```swift
func cancel()
```

## Discussion

Discussion Note that after you’ve called cancel(), you must close the stream to release resources.

## See Also

### Using Archive Byte Streams

- [seek(toOffset:relativeTo:)](applearchive/archivebytestreamprotocol/seek(tooffset:relativeto:).md)
- [close()](applearchive/archivebytestreamprotocol/close().md)
