From fbd0181b080f8f26a6a46b9566bec71395310bd4 Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Wed, 21 Jul 2010 19:59:21 +0100 Subject: Patching memory leaks in ChatController. Resolves: #328 diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index 79221c4..8117004 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp @@ -43,6 +43,12 @@ ChatController::ChatController(const JID& self, StanzaChannel* stanzaChannel, IQ chatWindow_->onUserCancelsTyping.connect(boost::bind(&ChatStateNotifier::userCancelledNewMessage, chatStateNotifier_)); } +ChatController::~ChatController() { + delete chatStateNotifier_; + delete chatStateMessageSender_; + delete chatStateTracker_; +} + void ChatController::setToJID(const JID& jid) { chatStateMessageSender_->setContact(jid); ChatControllerBase::setToJID(jid); diff --git a/Swift/Controllers/Chat/ChatController.h b/Swift/Controllers/Chat/ChatController.h index 26015a1..61ab752 100644 --- a/Swift/Controllers/Chat/ChatController.h +++ b/Swift/Controllers/Chat/ChatController.h @@ -18,6 +18,7 @@ namespace Swift { class ChatController : public ChatControllerBase { public: ChatController(const JID& self, StanzaChannel* stanzaChannel, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, const JID &contact, NickResolver* nickResolver, PresenceOracle* presenceOracle, AvatarManager* avatarManager, bool isInMUC, bool useDelayForLatency, UIEventStream* eventStream); + virtual ~ChatController(); virtual void setToJID(const JID& jid); private: -- cgit v0.10.2-6-g49f6