Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure that all QObjects which have been marked deleteLater
will get deleted in QgsApplication::exitQgis()

It's not strictly necessary, but helps remove a lot of noise
when tracking leaks using LeakSanitiser
  • Loading branch information
nyalldawson committed Aug 25, 2015
1 parent 572a3f4 commit 374d789
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsapplication.cpp
Expand Up @@ -629,6 +629,11 @@ void QgsApplication::initQgis()
void QgsApplication::exitQgis()
{
delete QgsProviderRegistry::instance();

//Ensure that all remaining deleteLater QObjects are actually deleted before we exit.
//This isn't strictly necessary (since we're exiting anyway) but doing so prevents a lot of
//LeakSanitiser noise which hides real issues
QgsApplication::sendPostedEvents( 0, QEvent::DeferredDelete );
}

QString QgsApplication::showSettings()
Expand Down

0 comments on commit 374d789

Please sign in to comment.