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

# init(bytesNoCopy:deallocator:)

Creates a new dispatch data object using the specified memory buffer and deallocator.

```
init(bytesNoCopy bytes: UnsafeRawBufferPointer, deallocator: DispatchData.Deallocator = .free)
```

## Parameters

`bytes`

A contiguous buffer of memory containing the initial data.

`deallocator`

The deallocator responsible for releasing the memory associated with the data object. For a list of possible options, see [`DispatchData.Deallocator`](/documentation/Dispatch/DispatchData/Deallocator).

---

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)