---
title: "withUnsafeMutableBytes(_:)"
framework: coremedia
role: symbol
role_heading: Instance Method
path: "coremedia/cmmutabledatablockbuffer/blockregion/withunsafemutablebytes(_:)"
---

# withUnsafeMutableBytes(_:)

Calls the given closure with a mutable pointer to the underlying bytes of the region’s contiguous storage.

## Declaration

```swift
func withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType
```
