private void OnApplicationQuit() { try { mGameFacade.Dispose(); GameFacade.Instance.RemoveMediator(typeof(ClientMessageProcessor).Name); } catch (System.Exception ex) { // Catch all here is to avoid browser crashes on exit if something becomes unstable. mLogger.Log(ex.ToString(), LogLevel.Error); } finally { mLogger.Flush(); } }