summaryrefslogtreecommitdiff
path: root/src/net/ea/charserverhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-20 05:26:02 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-20 05:26:02 +0300
commited0f26678c9aa154d3af441762b9a3ad5345747c (patch)
tree69183723af9c8f41fb7a13b62bff84960515e1a1 /src/net/ea/charserverhandler.cpp
parent5d4be5df7aaac5186c263caa9354891fec66d1c3 (diff)
downloadplus-ed0f26678c9aa154d3af441762b9a3ad5345747c.tar.gz
plus-ed0f26678c9aa154d3af441762b9a3ad5345747c.tar.bz2
plus-ed0f26678c9aa154d3af441762b9a3ad5345747c.tar.xz
plus-ed0f26678c9aa154d3af441762b9a3ad5345747c.zip
Fix memory leak in char selection dialog.
Diffstat (limited to 'src/net/ea/charserverhandler.cpp')
-rw-r--r--src/net/ea/charserverhandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index d71236496..63e267584 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -33,6 +33,7 @@
#include "net/ea/loginhandler.h"
#include "net/ea/eaprotocol.h"
+#include "utils/dtor.h"
#include "utils/gettext.h"
#include "resources/chardb.h"
@@ -184,4 +185,10 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED)
new OkDialog(_("Error"), _("Failed to delete character."));
}
+void CharServerHandler::clear()
+{
+ delete_all(mCharacters);
+ mCharacters.clear();
+}
+
} // namespace Ea