summaryrefslogtreecommitdiff
path: root/src/party.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-30 13:16:43 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-30 14:29:28 -0600
commit0c8fd1b9e6a4840bb573c26602f439e7c6ab9d7d (patch)
tree2996cae62236089221bc7c7bad6e834021db6114 /src/party.h
parent43abf72c78b492fa1cd383dac3990ee331c217ef (diff)
downloadmana-0c8fd1b9e6a4840bb573c26602f439e7c6ab9d7d.tar.gz
mana-0c8fd1b9e6a4840bb573c26602f439e7c6ab9d7d.tar.bz2
mana-0c8fd1b9e6a4840bb573c26602f439e7c6ab9d7d.tar.xz
mana-0c8fd1b9e6a4840bb573c26602f439e7c6ab9d7d.zip
Fix some memory issues
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/party.h')
-rw-r--r--src/party.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/party.h b/src/party.h
index d50ed7b0..c9d26672 100644
--- a/src/party.h
+++ b/src/party.h
@@ -25,6 +25,8 @@
#include "gui/widgets/avatarlistbox.h"
+#include "utils/dtor.h"
+
#include <map>
#include <string>
#include <vector>
@@ -132,7 +134,7 @@ public:
*/
void removeMember(const std::string &name);
- void clearMembers() { mMembers.clear(); }
+ void clearMembers() { delete_all(mMembers); mMembers.clear(); }
void removeFromMembers();
@@ -176,6 +178,8 @@ private:
*/
Party(short id);
+ ~Party();
+
typedef std::vector<PartyMember*> MemberList;
MemberList mMembers;
std::string mName;