I know that a ViewController
will have its deinit
method called once it is no longer needed (e.g. after an unwind segue and subsequent dismissal).
But I was wondering what the behavior of deinit
was in the context of the application lifecycle.
My questions
1) When (which app state active/inactive/background/etc), if at all, does deinit
get called if the app is terminated by the system due to memory constraints
2) When (which app state active/inactive/background/etc), if at all, does deinit
get called if the app is terminated by the user through the recently used app screen
3) When (which app state active/inactive/background/etc), if at all, does deinit
get called if the app is moved to the background by the user accepting an incoming call
4) When (which app state active/inactive/background/etc), if at all, does deinit
get called if the app is moved to the background by the user opening a different app