<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/dispatch_data_t",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "c:@T@dispatch_data_t"
  },
  "title" : "dispatch_data_t"
}
-->

# dispatch_data_t

An immutable object representing a contiguous or sparse region of memory.

```
typealias dispatch_data_t = __DispatchData
```

## Discussion

Any direct access to the memory in a dispatch data object must not modify that memory.

In 64-bit apps, you may cast a [`dispatch_data_t`](/documentation/Dispatch/dispatch_data_t) type to an <doc://com.apple.documentation/documentation/Foundation/NSData> object. However, you may not perform a reverse cast — that is, cast an <doc://com.apple.documentation/documentation/Foundation/NSData> object to a [`dispatch_data_t`](/documentation/Dispatch/dispatch_data_t) type.

---

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)