I reproduced bug in my game - when I run game, then change language in settings to some other, and then resume game, then I have a crash. What's the lifecycle of process / activity / Monogame when user changes languange ? As per https://developer.android.com/guide/topics/resources/runtime-changes.html, I think activity is recreated but what happends with Monogame framework ? Which callbacks are called ?
Suppose I have some singletons, which I initialize in Game.Initialize(). This is how it looks:
public static void Initialize()
if (INSTANCE != null)
throw new Exception("AppSettings instance is already initialized");
INSTANCE = new AppSettings();
When I change language, activity is recreated and so on Game.Initialize() is called, but I have already this singleton instance created and it leads to exception. Should I dispose somewhere this singleton ? Where and when should I do that ?