ソースを参照

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