summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-07-21 18:59:21 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-07-21 18:59:21 (GMT)
commitfbd0181b080f8f26a6a46b9566bec71395310bd4 (patch)
treef31ae195d18ca05a01687fd6eb356b394025e216 /Swift/Controllers
parent562eac542159f5ae1fe74eb2e21ee79aa3bc8929 (diff)
downloadswift-contrib-fbd0181b080f8f26a6a46b9566bec71395310bd4.zip
swift-contrib-fbd0181b080f8f26a6a46b9566bec71395310bd4.tar.bz2
Patching memory leaks in ChatController.
Resolves: #328
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp6
-rw-r--r--Swift/Controllers/Chat/ChatController.h1
2 files changed, 7 insertions, 0 deletions
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: