<!--
{
  "availability" : [
    "iOS: 17.0.0 - 27.0.0",
    "iPadOS: 17.0.0 - 27.0.0",
    "macCatalyst: 17.0.0 - 27.0.0",
    "macOS: 14.0.0 - 27.0.0",
    "tvOS: 17.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferVideoRenderer/flush(removingDisplayedImage:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferVideoRenderer(im)flushWithRemovalOfDisplayedImage:completionHandler:"
  },
  "title" : "flush(removingDisplayedImage:completionHandler:)"
}
-->

# flush(removingDisplayedImage:completionHandler:)

Tells the video renderer to discard pending enqueued sample buffers.

```
func flush(removingDisplayedImage removeDisplayedImage: Bool, completionHandler handler: (@Sendable () -> Void)? = nil)
```

## Parameters

`removeDisplayedImage`

A Boolean value that indicates whether to remove the display image.

`handler`

A completion handler the system invokes when the flush completes.

## 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)