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

# CVPixelBufferPoolFlush(_:_:)

Frees pixel buffers from the pool based on the options that you specify.

```
func CVPixelBufferPoolFlush(_ pool: CVPixelBufferPool, _ options: CVPixelBufferPoolFlushFlags)
```

## Parameters

`pool`

The pixel buffer pool to free.

`options`

Set to [`excessBuffers`](/documentation/CoreVideo/CVPixelBufferPoolFlushFlags/excessBuffers) to free all unused buffers regardless of their age. Pass an empty set to free only all aged-out buffers, or set it to [`excessBuffers`](/documentation/CoreVideo/CVPixelBufferPoolFlushFlags/excessBuffers) to free all unused buffers regardless of age.

## Discussion

---

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)