What do you mean with erased? Erased from your local machine?
If so, thats not Mendix platform related.
If you mean the running app in the Mendix cloud (not the project and model), after 2 hrs the running app terminates and restarts automatically when your return to the running app