---
title: "withUnsafeBuffer(_:)"
framework: corevideo
role: symbol
role_heading: Instance Method
path: "corevideo/cvbufferrepresentable/withunsafebuffer(_:)"
---

# withUnsafeBuffer(_:)

Access the underlying Buffer object. This function should be used to bridge existing code that uses the Buffer type.

## Declaration

```swift
func withUnsafeBuffer<R>(_ body: (Self.Buffer) throws -> sending R) rethrows -> sending R where R : ~Copyable
```
