---
title: invalidateRestorableState()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsresponder/invalidaterestorablestate()
---

# invalidateRestorableState()

Marks the responder’s interface-related state as dirty.

## Declaration

```swift
func invalidateRestorableState()
```

## Discussion

Discussion Call this method whenever the restorable state of your responder changes. This method marks the responder’s state as dirty, which writes the state to disk at some point in the future. Don’t override this method.

## See Also

### Handling Window Restoration

- [allowedClasses(forRestorableStateKeyPath:)](appkit/nsresponder/allowedclasses(forrestorablestatekeypath:).md)
- [encodeRestorableState(with:)](appkit/nsresponder/encoderestorablestate(with:).md)
- [encodeRestorableState(with:backgroundQueue:)](appkit/nsresponder/encoderestorablestate(with:backgroundqueue:).md)
- [restoreState(with:)](appkit/nsresponder/restorestate(with:).md)
- [restorableStateKeyPaths](appkit/nsresponder/restorablestatekeypaths.md)
