<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/disableFlushing()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)disableFlushWindow"
  },
  "title" : "disableFlushing()"
}
-->

# disableFlushing()

Disables the [`flush()`](/documentation/AppKit/NSWindow/flush()) method for the window.

```
func disableFlushing()
```

## Discussion

If the window is buffered, disabling [`flush()`](/documentation/AppKit/NSWindow/flush()) prevents drawing from being automatically flushed by the `NSView` `display...` methods from the window’s backing store to the screen. This method permits several views to be drawn before the results are shown to the user.

Flushing should be disabled only temporarily, while the window’s display is being updated. Each `disableFlushWindow` message must be paired with a subsequent [`enableFlushing()`](/documentation/AppKit/NSWindow/enableFlushing()) message. Invocations of these methods can be nested; flushing isn’t reenabled until the last [`enableFlushing()`](/documentation/AppKit/NSWindow/enableFlushing()) message is sent.

---

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)