---
title: flush()
framework: avfoundation
role: symbol
role_heading: Instance Method
path: avfoundation/avsamplebuffervideorenderer/receiver/flush()
---

# flush()

Instructs the receiver to discard pending enqueued sample buffers.

## Declaration

```swift
func flush()
```

## Discussion

Discussion Additional sample buffers can be appended after flush(). note: For video, it is not possible to determine which sample buffers have been decoded, so the next frame passed to enqueueSampleBuffer: should be an IDR frame (also known as a key frame or sync sample).

## See Also

### Flushing the receiver

- [flush(removingDisplayedImage:)](avfoundation/avsamplebuffervideorenderer/receiver/flush(removingdisplayedimage:).md)
