Codechange: use std::shared_ptr to manage saveload filters instead of manually trying to avoid double frees

This commit is contained in:
Rubidium
2024-02-02 18:13:38 +01:00
committed by rubidium42
parent 22eed9616e
commit 4b372b6050
8 changed files with 40 additions and 59 deletions

View File

@@ -69,7 +69,7 @@ public:
CommandQueue outgoing_queue; ///< The command-queue awaiting delivery
size_t receive_limit; ///< Amount of bytes that we can receive at this moment
struct PacketWriter *savegame; ///< Writer used to write the savegame.
std::shared_ptr<struct PacketWriter> savegame; ///< Writer used to write the savegame.
NetworkAddress client_address; ///< IP-address of the client (so they can be banned)
ServerNetworkGameSocketHandler(SOCKET s);