调整内存泄漏

This commit is contained in:
yangjiaxuan 2023-10-18 16:03:20 +08:00
parent 8b27ca39f7
commit 708f263aff
2 changed files with 2 additions and 1 deletions

View File

@ -242,6 +242,7 @@ int Manager::showAbnormalImgUi(bool qt, SANE_Image *img)
#endif
emit createAbnormalImgUi(qt, image);
HGBase_DestroyImage(image);
#ifdef HG_CMP_MSC
if (!qt)

View File

@ -8,7 +8,7 @@ Dialog_abnormal_img_select::Dialog_abnormal_img_select(HGImage image, QWidget *p
ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
m_view = new HGImgView();
m_view = new HGImgView(this);
m_view->addImage(image);
ui->stackedWidget->addWidget(m_view);
ui->stackedWidget->setCurrentWidget(m_view);