Qt中如下代码加载图片是否会造成内存泄漏
结束函数on_pushButton_clicked()调用后,graphicsView是否持有子对象scene的指针,scene持有子对象image的指针?
void MainWindow::on_pushButton_clicked()
{
QGraphicsScene* scene=new QGraphicsScene;
QPixmap* image=new QPixmap("C:/test/2.bmp");
scene->addPixmap(*image);
ui->graphicsView->setScene(scene);
ui->graphicsView->resize(image->width() + 10, image->height() + 10);
ui->graphicsView->show();
//delete scene;
//delete image;
}