03-01-2022 06:47 PM
Does anyone know how application recovery should be done? I want the application to revert to the state it was before the power outage when the computer is suddenly powered off and then powered back on.
03-01-2022 07:00 PM
At regular intervals keep writing the current state of the application to a custom file, if the application was closed properly, delete this file at close.
If the application was killed by a power outage, this file will not be deleted, during the application start look for this file and load the last good known state.
You've to define what should be stored in the file and what makes sense and what does not.
03-01-2022 07:08 PM - edited 03-01-2022 07:08 PM
@hy12369 wrote:
Does anyone know how application recovery should be done? I want the application to revert to the state it was before the power outage when the computer is suddenly powered off and then powered back on.
Of course, the best way is to prevent it from happening in the first place. If it's a power outage you are worried about, then get battery backup. If it's people you're worried about, sequester the computer.