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

@@ -16,7 +16,7 @@
class ClientNetworkGameSocketHandler : public ZeroedMemoryAllocator, public NetworkGameSocketHandler {
private:
std::string connection_string; ///< Address we are connected to.
struct PacketReader *savegame; ///< Packet reader for reading the savegame.
std::shared_ptr<struct PacketReader> savegame; ///< Packet reader for reading the savegame.
byte token; ///< The token we need to send back to the server to prove we're the right client.
/** Status of the connection with the server. */