In the onCreate() method I load a list of levels. This is stored in a singleton structure (using an enum for this). When I press the back button and return again, the list is still there and all the levels are added again. I don't understand why this is happening, since the Activity Lifecycle states that the process is killed before onCreate() is called again.
Why is this happening?
edit, some code:
In separate file:
public enum GameInformation {
INSTANCE;
public List<Level> levelSet;
public void loadLevelSet(Context context) {
...
}
}
In main activity:
public void onCreate(Bundle savedInstanceState) {
GameInformation.INSTANCE.loadLevelSet(this);
}