diff --git a/src/Actions/PublishAction.cpp b/src/Actions/PublishAction.cpp index f7abade..4bfdacd 100644 --- a/src/Actions/PublishAction.cpp +++ b/src/Actions/PublishAction.cpp @@ -4,6 +4,11 @@ PublishAction::PublishAction(MqttClient* mqttClient, ReaderMqttPacket packetRead publishMqttMessage = new PublishMqttMessage(packetReaded); } +PublishAction::~PublishAction(){ + delete publishMqttMessage; +} + + void PublishAction::doAction(){ mqttClient->notifyPublishRecived(publishMqttMessage); } \ No newline at end of file diff --git a/src/MqttBroker/MqttBroker.h b/src/MqttBroker/MqttBroker.h index 39ed75c..d1938bb 100644 --- a/src/MqttBroker/MqttBroker.h +++ b/src/MqttBroker/MqttBroker.h @@ -418,7 +418,7 @@ class PublishAction: public Action{ * PublishMqttMessage object. */ PublishAction(MqttClient* mqttClient, ReaderMqttPacket packetReaded); - + ~PublishAction(); /** * @brief Notify to Broker class a publish mqtt request * recevided from this client.