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

# isOneShot

A Boolean value that indicates whether the window device the window manages is freed when it’s removed from the screen list.

```
var isOneShot: Bool { get set }
```

## Discussion

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true>, the window’s window device is freed when it’s removed from the screen list (that is, hidden) and another is created when it’s returned to the screen. When the value is <doc://com.apple.documentation/documentation/Swift/false>, the window device is reused. Freeing the window device when it’s removed from the screen list can result in memory savings and performance improvement for window objects that don’t take long to display. Doing so is particularly appropriate for window objects the user might use once or twice, but not display continually.

---

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)