Delete the world... delete the children...

This commit is contained in:
MarcEricMartel 2023-11-28 11:53:21 -05:00
parent 5c346c48e6
commit 12ef911e79

View File

@ -21,6 +21,7 @@ Server::~Server() {
for (const auto& [key, player] : m_players)
closesocket(player->getSock());
m_players.clear();
delete m_world;
#ifdef _WIN32
WSACleanup();
#endif
@ -310,6 +311,7 @@ void Server::Log(std::string str, bool is_error = false, bool is_fatal = false)
for (const auto& [key, player] : m_players) {
closesocket(player->getSock());
}
delete m_world;
m_players.clear();
#ifdef _WIN32
WSACleanup();