<!--
{
  "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/CVBufferRemoveAttachment(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@F@CVBufferRemoveAttachment"
  },
  "title" : "CVBufferRemoveAttachment(_:_:)"
}
-->

# CVBufferRemoveAttachment(_:_:)

Removes the attachment you specify from a Core Video buffer.

```
func CVBufferRemoveAttachment(_ buffer: CVBuffer, _ key: CFString)
```

## Parameters

`buffer`

The buffer containing the attachment to remove.

`key`

A string that identifies the attachment, which can be of any <doc://com.apple.documentation/documentation/CoreFoundation/CFTypeRef>. See [CVBuffer Attachment Keys](/documentation/CoreVideo/cvbuffer-attachment-keys) and [Image Buffer Attachment Keys](/documentation/CoreVideo/image-buffer-attachment-keys) for predefined values.

## Discussion

If the attachment exists in the buffer, the system removes it and decrements the retain count.

---

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)