Skip to content
Snippets Groups Projects
Commit 887150f0 authored by Alberto Nidasio's avatar Alberto Nidasio Committed by Emilio Corigliano
Browse files

[OutgoingMessageViewer] Unsubscribe from message topics in destructor

parent 2fa02194
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,18 @@ OutgoingMessagesViewerModule::OutgoingMessagesViewerModule() ...@@ -53,6 +53,18 @@ OutgoingMessagesViewerModule::OutgoingMessagesViewerModule()
&OutgoingMessagesViewerModule::updateElapsedTime); &OutgoingMessagesViewerModule::updateElapsedTime);
} }
OutgoingMessagesViewerModule::~OutgoingMessagesViewerModule()
{
MessageBroker::getInstance().unsubscribe(
Filter::fromString(SkywardHubStrings::logCommandsTopic), this);
MessageBroker::getInstance().unsubscribe(
Filter::fromString(SkywardHubStrings::mavlink_received_msg_ACK_topic),
this);
MessageBroker::getInstance().unsubscribe(
Filter::fromString(SkywardHubStrings::mavlink_received_msg_NACK_topic),
this);
}
XmlObject OutgoingMessagesViewerModule::toXmlObject() XmlObject OutgoingMessagesViewerModule::toXmlObject()
{ {
XmlObject obj = Module::toXmlObject(); XmlObject obj = Module::toXmlObject();
......
...@@ -33,6 +33,7 @@ class OutgoingMessagesViewerModule : public Module ...@@ -33,6 +33,7 @@ class OutgoingMessagesViewerModule : public Module
public: public:
OutgoingMessagesViewerModule(); OutgoingMessagesViewerModule();
~OutgoingMessagesViewerModule();
XmlObject toXmlObject() override; XmlObject toXmlObject() override;
void fromXmlObject(const XmlObject& xmlObject) override; void fromXmlObject(const XmlObject& xmlObject) override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment