---
title: discardCachedImage()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nswindow/discardcachedimage()
---

# discardCachedImage()

Discards all of the window’s cached image rectangles.

## Declaration

```swift
func discardCachedImage()
```

## Discussion

Discussion An NSWindow object automatically discards its cached image rectangles when it displays.

## See Also

### Related Documentation

- [display()](appkit/nswindow/display().md)

### Methods

- [gState()](appkit/nswindow/gstate().md)
- [canStoreColor()](appkit/nswindow/canstorecolor().md)
- [enableFlushing()](appkit/nswindow/enableflushing().md)
- [disableFlushing()](appkit/nswindow/disableflushing().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)
- [useOptimizedDrawing(_:)](appkit/nswindow/useoptimizeddrawing(_:).md)
- [init(windowRef:)](appkit/nswindow/init(windowref:).md)
