Parcourir la source

FIX: proper destruction of host

Marco Nolden il y a 15 ans
Parent
commit
db0de35b19

+ 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();