---
title: "init(bytesNoCopy:deallocator:)"
framework: dispatch
role: symbol
role_heading: Initializer
path: "dispatch/dispatchdata/init(bytesnocopy:deallocator:)-7h08w"
---

# init(bytesNoCopy:deallocator:)

Initialize a data object without copying the bytes.

## Declaration

```swift
init(bytesNoCopy bytes: UnsafeBufferPointer<UInt8>, deallocator: DispatchData.Deallocator = .free)
```

## Parameters

- `bytes`: A pointer to the bytes.
- `deallocator`: Specifies the mechanism to free the indicated buffer.

## See Also

### Deprecated

- [init(bytes:)](dispatch/dispatchdata/init(bytes:)-mkbp.md)
- [append(_:count:)](dispatch/dispatchdata/append(_:count:).md)
- [copyBytes(to:count:)](dispatch/dispatchdata/copybytes(to:count:)-4ffyj.md)
- [copyBytes(to:from:)](dispatch/dispatchdata/copybytes(to:from:)-6ztcb.md)
