diff options
Diffstat (limited to 'Swift/Controllers/XMPPEvents/EventController.cpp')
-rw-r--r-- | Swift/Controllers/XMPPEvents/EventController.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/Controllers/XMPPEvents/EventController.cpp b/Swift/Controllers/XMPPEvents/EventController.cpp index 381a5a1..f2fdcfe 100644 --- a/Swift/Controllers/XMPPEvents/EventController.cpp +++ b/Swift/Controllers/XMPPEvents/EventController.cpp @@ -18,6 +18,12 @@ namespace Swift { EventController::EventController() { } +EventController::~EventController() { + foreach(boost::shared_ptr<StanzaEvent> event, events_) { + event->onConclusion.disconnect(boost::bind(&EventController::handleEventConcluded, this, event)); + } +} + void EventController::handleIncomingEvent(boost::shared_ptr<StanzaEvent> sourceEvent) { boost::shared_ptr<MessageEvent> messageEvent = boost::dynamic_pointer_cast<MessageEvent>(sourceEvent); boost::shared_ptr<SubscriptionRequestEvent> subscriptionEvent = boost::dynamic_pointer_cast<SubscriptionRequestEvent>(sourceEvent); |