瀏覽代碼

FIX: proper destruction of host

Marco Nolden 15 年之前
父節點
當前提交
db0de35b19

+ 2 - 1
Applications/ctkExampleHost/ctkHostAppExampleWidget.cpp

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

+ 1 - 1
Applications/ctkExampleHost/ctkHostAppExampleWidget.h

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