From be607ce6c822d6ec79a7e7f8be6c7eb7130ee3b6 Mon Sep 17 00:00:00 2001 From: satyam yadav Date: Sun, 30 Nov 2025 17:57:21 +0530 Subject: [PATCH] memory leak --- modules/highgui/src/window_QT.cpp | 4 ++++ modules/highgui/src/window_QT.h | 1 + 2 files changed, 5 insertions(+) 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);