---
title: isReleasedWhenClosed
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nswindow/isreleasedwhenclosed
---

# isReleasedWhenClosed

A Boolean value that indicates whether the window is released when it receives the close message.

## Declaration

```swift
var isReleasedWhenClosed: Bool { get set }
```

## Discussion

Discussion The value of this property is true if the window is automatically released after being closed; false if it’s simply removed from the screen. The default for NSWindow is true; the default for NSPanel is false. Release when closed, however, is ignored for windows owned by window controllers. warning: Swift and Automatic Reference Counting (ARC) clients need to set this property to false to avoid releasing the window too many times.

## See Also

### Closing Windows

- [performClose(_:)](appkit/nswindow/performclose(_:).md)
- [close()](appkit/nswindow/close().md)
