<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.13.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/BackingStoreType/retained",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSBackingStoreType@NSBackingStoreRetained"
  },
  "title" : "NSWindow.BackingStoreType.retained"
}
-->

# NSWindow.BackingStoreType.retained

The window uses a buffer, but draws directly to the screen where possible and to the buffer for obscured portions.

```
case retained
```

## Discussion

You should not use this mode. It combines the limitations of `NSBackingStoreNonretained` with the memory use of `NSBackingStoreBuffered`. The original NeXTSTEP implementation was an interesting compromise that worked well with fast memory mapped framebuffers on the CPU bus—something that hasn’t been in general use since around 1994. These tend to have performance problems.

In macOS 10.5 and later, requests for retained windows will result in the window system creating a buffered window, as that better matches actual use.

---

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)