---
title: readOnly
framework: corevideo
role: symbol
role_heading: Type Property
path: corevideo/cvpixelbufferlockflags/readonly
---

# readOnly

A read-only buffer.

## Declaration

```swift
static var readOnly: CVPixelBufferLockFlags { get }
```

## Discussion

Discussion Set this flag if you don’t plan to modify buffer data while holding the lock. Setting this flag improves performance by preventing Core Video from invalidating  existing caches of the buffer’s contents. important: If you pass this flag to the CVPixelBufferLockBaseAddress(_:_:) function, you must also pass it to the CVPixelBufferUnlockBaseAddress(_:_:) function.
