public void Release() { ValidReleaseOnce(); GameServer game_s = null; while (m_FreeGameServerQueue.Count > 0) { game_s = m_FreeGameServerQueue.Dequeue(); game_s.Release(); game_s = null; } m_FreeGameServerQueue = null; foreach (GameServer tmp_game_s in m_ConnectedGameServerList) { tmp_game_s.Release(); } m_ConnectedGameServerList.Clear(); m_ConnectedGameServerList = null; foreach (GameServer tmp_game_s in m_AuthedGameServerDict.Values) { tmp_game_s.Release(); } m_AuthedGameServerDict.Clear(); m_AuthedGameServerDict = null; }
public void Release() { ValidReleaseOnce(); User user = null; while (m_FreeUserQueue.Count > 0) { user = m_FreeUserQueue.Dequeue(); user.Release(); } m_FreeUserQueue = null; foreach (User tmp_user in m_ConnectedUserList) { tmp_user.Release(); } m_ConnectedUserList.Clear(); m_ConnectedUserList = null; foreach (User tmp_user in m_AuthedUserDict.Values) { tmp_user.Release(); } m_AuthedUserDict.Clear(); m_AuthedUserDict = null; }