<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "swift: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchData/init(bytesNoCopy:deallocator:)-7h08w",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:8Dispatch0A4DataV11bytesNoCopy11deallocatorACSRys5UInt8VG_AC11DeallocatorOtcfc"
  },
  "title" : "init(bytesNoCopy:deallocator:)"
}
-->

# init(bytesNoCopy:deallocator:)

Initialize a data object without copying the bytes.

```
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.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)