let animation objects delete themselves after they are not being used anymore
PS:
I don't like that we create new animation objects every single time before a page transition is done, I'm sure that can be done in a nicer way.
But at least we're not keeping those non-reused objects around forever now...
#include <QApplication>
#include "mainform.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWindow *mainWin = new MyWindow;
mainWin->show();
return app.exec();
}