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. Task-number: QTBUG-111228 Change-Id: If362b0e1e5b50d711a8fe8e01a8830034edf5363 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> (cherry picked from commit b1d59d6dd97e99086d15b29765282866500942f3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
da0abaf44e
commit
f2e2c08bef
@ -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…
x
Reference in New Issue
Block a user