---
title: shouldCloseDocument
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nswindowcontroller/shouldclosedocument
---

# shouldCloseDocument

A Boolean value that indicates whether the receiver necessarily closes the associated document when the window it manages is closed.

## Declaration

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

## Discussion

Discussion The value of this property is true if the receiver necessarily closes the associated document when the window it manages is closed, false otherwise. The default value is false.

## See Also

### Closing the Window

- [close()](appkit/nswindowcontroller/close().md)
