Memory leak in QPropertyAnimation
-
Hello,
could you please help my with investivation. Why this part of code cased to a memory leak?
@
QPropertyAnimation *animation = new QPropertyAnimation(ui->createAdv, "geometry");
animation->setDuration(1100);
animation->setStartValue(QRect(0, -20, 60, 31));
animation->setEndValue(QRect(0, 82, 200, 31));
connect(animation,SIGNAL(finished()),animation,SLOT(deleteLater()));
animation->start();@ -
looks good so far IMHO, as long as there are no console warnings and connect() returns true.
btw. you can also do this to safe the connection of signals at all:
@
animation->start(QAbstractAnimation::DeleteWhenStopped);
@ -
why do you know there is a memory leak in first place?