From 035d143615ec2abb9f9839bfa0ea909ade1bfae1 Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Wed, 2 Dec 2009 14:52:37 +0100 Subject: [PATCH] memory leak --- common/server_player.cpp | 5 +++++ common/server_player.h | 1 + 2 files changed, 6 insertions(+) diff --git a/common/server_player.cpp b/common/server_player.cpp index 9b523799..ca495217 100644 --- a/common/server_player.cpp +++ b/common/server_player.cpp @@ -14,6 +14,11 @@ Server_Player::Server_Player(Server_Game *_game, int _playerId, const QString &_ { } +Server_Player::~Server_Player() +{ + delete deck; +} + int Server_Player::newCardId() { return nextCardId++; diff --git a/common/server_player.h b/common/server_player.h index 5f33dab0..3a324b69 100644 --- a/common/server_player.h +++ b/common/server_player.h @@ -32,6 +32,7 @@ private: bool conceded; public: Server_Player(Server_Game *_game, int _playerId, const QString &_playerName, bool _spectator, Server_ProtocolHandler *_handler); + ~Server_Player(); void setProtocolHandler(Server_ProtocolHandler *_handler) { handler = _handler; } void setPlayerId(int _id) { playerId = _id; }