/**
* Called when the application's state changes to App::TERMINATING. @n
* All the activities involved in terminating the application, including saving the application's states, must be done in the %OnAppTerminating() method.
- * After this method, the application code cannot be executed. The application is destroyed subsequently.
+ * After this method, the application code cannot be executed. The application is destroyed subsequently. @n
+ *
+ * An application can be terminated by either system, such as power-off and OOM, or others, such as self and other applications. @n
+ * When the termination by system, called an “urgent termination”, occurs, the method, OnAppTerminating(), cannot be executed properly.
+ * For more details, while power-off, even if OnAppTerminating() is called, it has a short time for executing. If the application is killed by OOM, OnAppTerminating() is not called. @n
+ * Because OnAppTerminating() is not likely to be called due to urgent termination, the application should save the critical data as they can do.
+ * For example, the application can set the check point or use the callback for low memory. @n
+ * When the termination by self or other applications, called a “normal termination”, occurs, the method, OnAppTerminating(), can be executed properly.
+ * It provides more time for executing than urgent termination, but limits to the time to 3 or 5 seconds. @n
+ * The main loop is already quitted when OnAppTerminating() is called.
+ * Thus, the application should not use a kind of asynchronous API of which the callback is triggered by the main loop.
*
* @since 2.0
*
* @return @c true if the method is successful, @n
* else @c false
* @param[in] appRegistry The instance that manages the application's states
- * @param[in] forcedTermination Set to @c true if the application is terminated by the system or another application, @n
+ * @param[in] urgentTermination Set to @c true if the application is terminated by the system, @n
* else @c false
*/
- virtual bool OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination = false) = 0;
+ virtual bool OnAppTerminating(AppRegistry& appRegistry, bool urgentTermination = false) = 0;
/**
* Called when the system detects that the system wide memory or application heap memory is insufficient to run the application any further. @n