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

# discardCachedImage()

Discards all of the window’s cached image rectangles.

```
func discardCachedImage()
```

## Discussion

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

## See Also

[`display()`](/documentation/AppKit/NSWindow/display())

Passes a display message down the window’s view hierarchy, thus redrawing all views within the window.



---

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)