---
title: "CVPixelBufferPoolFlush(_:_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvpixelbufferpoolflush(_:_:)"
---

# CVPixelBufferPoolFlush(_:_:)

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

## Declaration

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

## Parameters

- `pool`: The pixel buffer pool to free.
- `options`: Set to doc://com.apple.corevideo/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 doc://com.apple.corevideo/documentation/CoreVideo/CVPixelBufferPoolFlushFlags/excessBuffers to free all unused buffers regardless of age.
