rsslisting example: don't leak the RSSListing object
It was new'd and unparented, so its destructor was never getting called. A stack instance will do just fine. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: If362b0e1e5b50d711a8fe8e01a8830034edf5363 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
This commit is contained in:
parent
179b61c85f
commit
b1d59d6dd9
@ -20,7 +20,7 @@ Provides the main function for the RSS news reader example.
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
RSSListing *rsslisting = new RSSListing;
|
||||
rsslisting->show();
|
||||
RSSListing rsslisting;
|
||||
rsslisting.show();
|
||||
return app.exec();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user