From af61285030fa17604a0d3812c679c45cdc8c2a5d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 3 Aug 2017 21:13:18 +0300 Subject: Remove network handlers in general handler was deleted. --- src/net/ea/charserverhandler.cpp | 5 +++++ src/net/ea/charserverhandler.h | 2 ++ src/net/ea/chathandler.cpp | 5 +++++ src/net/ea/chathandler.h | 2 ++ src/net/ea/partyhandler.cpp | 1 + 5 files changed, 15 insertions(+) (limited to 'src/net/ea') diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index d0703e501..ae8da9e4a 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -41,6 +41,11 @@ CharServerHandler::CharServerHandler() : { } +CharServerHandler::~CharServerHandler() +{ + clear(); +} + void CharServerHandler::setCharSelectDialog(CharSelectDialog *const window) const { diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h index bd7d1cce2..1faa59403 100644 --- a/src/net/ea/charserverhandler.h +++ b/src/net/ea/charserverhandler.h @@ -36,6 +36,8 @@ class CharServerHandler notfinal : public Net::CharServerHandler public: A_DELETE_COPY(CharServerHandler) + ~CharServerHandler(); + void setCharSelectDialog(CharSelectDialog *const window) const override final; diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index c9f18ad86..8937852c6 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -41,6 +41,11 @@ ChatHandler::ChatHandler() ChatRecv::mSkipping = true; } +ChatHandler::~ChatHandler() +{ + clear(); +} + void ChatHandler::clear() const { ChatRecv::mShowMotd = config.getBoolValue("showmotd"); diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index 43b4de88b..b19105193 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -39,6 +39,8 @@ class ChatHandler notfinal : public Net::ChatHandler A_DELETE_COPY(ChatHandler) + ~ChatHandler(); + void me(const std::string &restrict text, const std::string &restrict channel) const override final; diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 531b4bdba..23f7347b9 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -45,6 +45,7 @@ PartyHandler::PartyHandler() : PartyHandler::~PartyHandler() { delete2(partyTab); + taParty = nullptr; } void PartyHandler::join(const int partyId A_UNUSED) const -- cgit v1.2.3-70-g09d2