diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-20 05:26:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-20 05:26:02 +0300 |
commit | ed0f26678c9aa154d3af441762b9a3ad5345747c (patch) | |
tree | 69183723af9c8f41fb7a13b62bff84960515e1a1 /src/net/ea/charserverhandler.cpp | |
parent | 5d4be5df7aaac5186c263caa9354891fec66d1c3 (diff) | |
download | manaplus-ed0f26678c9aa154d3af441762b9a3ad5345747c.tar.gz manaplus-ed0f26678c9aa154d3af441762b9a3ad5345747c.tar.bz2 manaplus-ed0f26678c9aa154d3af441762b9a3ad5345747c.tar.xz manaplus-ed0f26678c9aa154d3af441762b9a3ad5345747c.zip |
Fix memory leak in char selection dialog.
Diffstat (limited to 'src/net/ea/charserverhandler.cpp')
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 7 |
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 |