Skip to content

Commit

Permalink
Fix some leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 23, 2015
1 parent 366331c commit 8a949fa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsdataitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ QgsDataItem::~QgsDataItem()
mDeferredDelete = true;
mFutureWatcher->waitForFinished();
}

delete mFutureWatcher;
}

QString QgsDataItem::pathComponent( const QString &string )
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsproviderregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ QgsProviderRegistry::~QgsProviderRegistry()
if ( cleanupFunc )
cleanupFunc();
}
delete it->second;
++it;
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgsdataitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ void TestQgsDataItem::testDirItemChildren()
}

}
qDeleteAll( children );

delete dirItem;
}
Expand Down
3 changes: 1 addition & 2 deletions tests/src/core/testqgsrastersublayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ void TestQgsRasterSubLayer::initTestCase()
myRasterFileInfo.completeBaseName() );
qDebug() << "raster metadata: " << mpRasterLayer->dataProvider()->metadata();
mReport += "raster metadata: " + mpRasterLayer->dataProvider()->metadata();

QgsMapLayerRegistry::instance()->addMapLayer( mpRasterLayer );
}
else
{
Expand All @@ -115,6 +113,7 @@ void TestQgsRasterSubLayer::initTestCase()
//runs after all tests
void TestQgsRasterSubLayer::cleanupTestCase()
{
delete mpRasterLayer;
QgsApplication::exitQgis();
QString myReportFile = QDir::tempPath() + "/qgistest.html";
QFile myFile( myReportFile );
Expand Down

0 comments on commit 8a949fa

Please sign in to comment.