if we assume that:
Activity is "Window Manager"
-- as its main component is Window )
so calling finish() is equal to Close button in Window'ed application :)
- is used to reclaim resources.
to confirm this assumption we can look at Activity class definition
public class Activity extends ContextThemeWrapper
implements LayoutInflater.Factory2,
Window.Callback, KeyEvent.Callback,
OnCreateContextMenuListener, ComponentCallbacks2,
Window.OnWindowDismissedCallback {
...
private WindowManager mWindowManager;
/*package*/ View mDecor = null;
...
/**
* Call this when your activity is done and should be closed. The
* ActivityResult is propagated back to whoever launched you via
* onActivityResult().
*/
public void finish() {
finish(false);
}
/**
* Finishes current activity & specifies whether to remove the task associated with it.
*/
private void finish(boolean finishTask) {
...
}
}
to answer to your question You need know what exactly you are planning to do with your activity later ??? - generally predict its lifetime !
- leave it on stack for later use
- release only resources and hold instance (to omit time consuming later initialization)
- destroy its instance (in case you will not use it anymore) - as finish
when to call finish??? depends on many factors that are present in the application code and it's personalized and requires an individual approach.