There are basically two methods how screens can be switched correctly:
-
Screen1 remains open after switching to another screen. All other screens are closed when you switch to another screen. This means that at most two screens are open at the same time. If another screen is then closed, Screen1 comes to the foreground again (since it wasn't closed). Then only one sceen is open.
-
Each screen (including Screen1) is closed when another screen is opened. This means that only one screen is open at the same time.
Which method is preferred depends on various considerations - for example:
Sometimes it is required that Screen1 be reinitialized after returning from another screen. This is only possible with method 2. Otherwise, Screen1 would be reopened, eventually causing a memory issue and crashing the app.
On the other hand, Screen1 may be very extensive (it contains many blocks, procedures, extensions, etc.) so that initialization takes some time. In this case, it would make more sense not to close (and reopen) Screen1, but only by closing another screen to get back there (i.e. to Screen1).
Maybe this explanation will help you a bit.