[C++] Page destructor not called on exit #1904
-
Beta Was this translation helpful? Give feedback.
Answered by
andrewleader
Dec 13, 2021
Replies: 1 comment
-
Hi @nlogozzo, the best practice in this case is to save the settings immediately when they're changed (for example, when the user selects light theme, save that setting immediately). That way, if your app crashes or is force closed, the settings will still be saved. Alternatively, you could show the user a "Save" button. Closing the app via the X button is similar to a force terminate and you shouldn't rely on destructors to be called to save app state. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nlogozzo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @nlogozzo, the best practice in this case is to save the settings immediately when they're changed (for example, when the user selects light theme, save that setting immediately). That way, if your app crashes or is force closed, the settings will still be saved. Alternatively, you could show the user a "Save" button.
Closing the app via the X button is similar to a force terminate and you shouldn't rely on destructors to be called to save app state.