Skip to content
Snippets Groups Projects
Commit bb305a55 authored by Alberto Nidasio's avatar Alberto Nidasio
Browse files

[OutgoingMessageViewer] Unsubscribe from message topics in destructor

parent d01f3f50
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,18 @@ OutgoingMessagesViewerModule::OutgoingMessagesViewerModule()
&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 obj = Module::toXmlObject();
......
......@@ -33,6 +33,7 @@ class OutgoingMessagesViewerModule : public Module
public:
OutgoingMessagesViewerModule();
~OutgoingMessagesViewerModule();
XmlObject toXmlObject() override;
void fromXmlObject(const XmlObject& xmlObject) override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment