diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index fa8c5d7801..3746acb171 100644 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -1740,6 +1740,10 @@ CvWindow::CvWindow(QString name, int arg2) show(); } +CvWindow::~CvWindow() +{ + delete myView; +} void CvWindow::setMouseCallBack(CvMouseCallback callback, void* param) { diff --git a/modules/highgui/src/window_QT.h b/modules/highgui/src/window_QT.h index 1224ba9d32..2e72aee9b3 100644 --- a/modules/highgui/src/window_QT.h +++ b/modules/highgui/src/window_QT.h @@ -298,6 +298,7 @@ class CvWindow : public CvWinModel Q_OBJECT public: CvWindow(QString arg2, int flag = CV_WINDOW_NORMAL); + ~CvWindow(); void setMouseCallBack(CvMouseCallback m, void* param);