From 61dd8a5ee66734dfd53ee9be725c9e71fd8d5414 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 12 Dec 2022 13:57:33 +0100 Subject: implement DYN_MEMBER_SIZEOF macro correctly and implement cd_cmd_response_sizeof --- confui/mainwindow.cpp | 5 ++++- confui/serial.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'confui') diff --git a/confui/mainwindow.cpp b/confui/mainwindow.cpp index 1fd34c4..b5bbdf0 100644 --- a/confui/mainwindow.cpp +++ b/confui/mainwindow.cpp @@ -13,7 +13,10 @@ CDMeshConnector *g_cd_mesh_connector = nullptr; CDSerialConnector *g_cd_serial = nullptr; QApplication* g_cd_app = nullptr; -CDMainWindow::~CDMainWindow() { delete this->mesh_connector; } +CDMainWindow::~CDMainWindow() { + delete g_cd_mesh_connector; + delete g_cd_serial; +} CDMainWindow::CDMainWindow(QWidget *parent) : QMainWindow(parent) { g_cd_mesh_connector = new CDMeshConnector(); diff --git a/confui/serial.h b/confui/serial.h index 22f2542..aa0508f 100644 --- a/confui/serial.h +++ b/confui/serial.h @@ -11,7 +11,7 @@ using std::vector; class CDSerialConnector { public: CDSerialConnector(); - ~CDSerialConnector(); + virtual ~CDSerialConnector(); /** @brief get list of available serial ports */ static vector get_ports(); -- cgit v1.2.3