diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index f47aad6..781b180 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -108,6 +108,7 @@ void Room::UnInit() A8_SAFE_DELETE(incubator_); timer_attacher.ClearTimerList(); xtimer_attacher_.ClearTimerList(); + grid_service->ClearRoomData(this); for (auto& pair : accountid_hash_) { PlayerMgr::Instance()->RemovePlayerBySocket(pair.second->socket_handle); } @@ -127,7 +128,6 @@ void Room::UnInit() delete pair.second; } team_hash_.clear(); - grid_service->ClearRoomData(this); PerfMonitor::Instance()->alive_count -= alive_count_; }