---
title: disableFlushing()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nswindow/disableflushing()
---

# disableFlushing()

Disables the flush() method for the window.

## Declaration

```swift
func disableFlushing()
```

## Discussion

Discussion If the window is buffered, disabling 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() message. Invocations of these methods can be nested; flushing isn’t reenabled until the last enableFlushing() message is sent.

## See Also

### Methods

- [gState()](appkit/nswindow/gstate().md)
- [canStoreColor()](appkit/nswindow/canstorecolor().md)
- [enableFlushing()](appkit/nswindow/enableflushing().md)
- [flush()](appkit/nswindow/flush().md)
- [flushIfNeeded()](appkit/nswindow/flushifneeded().md)
- [menuChanged(_:)](appkit/nswindow/menuchanged(_:).md)
- [cacheImage(in:)](appkit/nswindow/cacheimage(in:).md)
- [restoreCachedImage()](appkit/nswindow/restorecachedimage().md)
- [discardCachedImage()](appkit/nswindow/discardcachedimage().md)
- [useOptimizedDrawing(_:)](appkit/nswindow/useoptimizeddrawing(_:).md)
- [init(windowRef:)](appkit/nswindow/init(windowref:).md)
