Persist the current state and undo stack so they're not lost when the app is killed for resource use etc.
Persist the current state and undo stack so they're not lost when the app is killed for resource use etc.