解决内存泄漏
This commit is contained in:
parent
f14e49bc54
commit
5536b0a932
|
@ -10,7 +10,7 @@ Dialog_AbnormalImage::Dialog_AbnormalImage(HGImage image, QWidget *parent) :
|
||||||
|
|
||||||
m_result = HGBASE_ERR_OK;
|
m_result = HGBASE_ERR_OK;
|
||||||
|
|
||||||
m_view = new HGImgView();
|
m_view = new HGImgView(this);
|
||||||
m_view->addImage(image);
|
m_view->addImage(image);
|
||||||
ui->stackedWidget->addWidget(m_view);
|
ui->stackedWidget->addWidget(m_view);
|
||||||
ui->stackedWidget->setCurrentWidget(m_view);
|
ui->stackedWidget->setCurrentWidget(m_view);
|
||||||
|
|
|
@ -1316,9 +1316,7 @@ void MainWindow::on_newImage(void *image)
|
||||||
|
|
||||||
void MainWindow::on_abnormalImage(void *image, HGUInt *result)
|
void MainWindow::on_abnormalImage(void *image, HGUInt *result)
|
||||||
{
|
{
|
||||||
HGImage img = nullptr;
|
Dialog_AbnormalImage dlg((HGImage)image, this);
|
||||||
HGBase_CloneImage((HGImage)image, 0, 0, &img);
|
|
||||||
Dialog_AbnormalImage dlg(img, this);
|
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
*result = dlg.getResult();
|
*result = dlg.getResult();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue