---
title: "withUnsafeMutableBytes(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/lowlevelbuffer/withunsafemutablebytes(_:)"
---

# withUnsafeMutableBytes(_:)

Update the buffer’s contents synchronously on the CPU. The buffer provided is only valid for the lifetime of the callback.

## Declaration

```swift
final func withUnsafeMutableBytes(_ callback: (UnsafeMutableRawBufferPointer) -> Void)
```
