Преглед на файлове

FIX: proper destruction of host

Marco Nolden преди 15 години
родител
ревизия
db0de35b19
променени са 2 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 2 1
      Applications/ctkExampleHost/ctkHostAppExampleWidget.cpp
  2. 1 1
      Applications/ctkExampleHost/ctkHostAppExampleWidget.h

+ 2 - 1
Applications/ctkExampleHost/ctkHostAppExampleWidget.cpp

@@ -26,7 +26,8 @@ ctkHostAppExampleWidget::ctkHostAppExampleWidget(QWidget *parent) :
 
 ctkHostAppExampleWidget::~ctkHostAppExampleWidget()
 {
-    delete ui;
+  delete host;
+  delete ui;
 }
 
 void ctkHostAppExampleWidget::startButtonClicked()

+ 1 - 1
Applications/ctkExampleHost/ctkHostAppExampleWidget.h

@@ -19,7 +19,7 @@ public:
     explicit ctkHostAppExampleWidget(QWidget *parent = 0);
     void setAppFileName(QString name);
 
-    ~ctkHostAppExampleWidget();
+    virtual ~ctkHostAppExampleWidget();
 public slots:
     void loadButtonClicked();
     void startButtonClicked();