<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVBufferRetain",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@F@CVBufferRetain"
  },
  "title" : "CVBufferRetain"
}
-->

# CVBufferRetain

Retains a Core Video buffer.

```
extern CVBufferRefCVBufferRetain(CVBufferRef buffer);
```

## Parameters

`buffer`

The Core Video buffer that you want to retain.

## Return Value

For convenience, the same Core Video buffer you wanted to retain.

## Discussion

Like <doc://com.apple.documentation/documentation/CoreFoundation/CFRetain>, this function increments the retain count of a Core Video buffer. However, unlike <doc://com.apple.documentation/documentation/CoreFoundation/CFRetain>, this function is `NULL` safe.

---

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)