소스 검색

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