[Interest] How to properly delete qApp?

Jan Kundrát jkt at kde.org
Wed Mar 16 15:12:30 CET 2016


On Wednesday, 16 March 2016 15:07:30 CET, Nikos Chantziaras wrote:
>       QApplication app = new QApplication(/* ... */);
>       app->exec();
>       delete app;

There's no point to use heap allocation in this context. You can simply 
create a QApplication instance on stack in your main.

Cheers,
Jan

-- 
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/



More information about the Interest mailing list