Skip to content

Commit

Permalink
fix some memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
minorua committed Apr 22, 2013
1 parent cbea2d4 commit f3ab812
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core/raster/qgscontrastenhancement.cpp
Expand Up @@ -77,6 +77,8 @@ QgsContrastEnhancement::QgsContrastEnhancement( const QgsContrastEnhancement& ce

QgsContrastEnhancement::~QgsContrastEnhancement()
{
delete [] mLookupTable;
delete mContrastEnhancementFunction;
}
/*
*
Expand Down
2 changes: 2 additions & 0 deletions src/core/raster/qgsrasterinterface.cpp
Expand Up @@ -219,6 +219,7 @@ QgsRasterBandStats QgsRasterInterface::bandStatistics( int theBandNo,
myMean += myDelta / myRasterBandStats.elementCount;
mySumOfSquares += myDelta * ( myValue - myMean );
}
delete blk;
}
}

Expand Down Expand Up @@ -478,6 +479,7 @@ QgsRasterHistogram QgsRasterInterface::histogram( int theBandNo,
myHistogram.histogramVector[myBinIndex] += 1;
myHistogram.nonNullCount++;
}
delete blk;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasternuller.cpp
Expand Up @@ -50,9 +50,9 @@ QGis::DataType QgsRasterNuller::dataType( int bandNo ) const
QgsRasterBlock * QgsRasterNuller::block( int bandNo, QgsRectangle const & extent, int width, int height )
{
QgsDebugMsg( "Entered" );
QgsRasterBlock *outputBlock = new QgsRasterBlock();
if ( !mInput )
{
QgsRasterBlock *outputBlock = new QgsRasterBlock();
return outputBlock;
}

Expand Down
1 change: 1 addition & 0 deletions src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -971,6 +971,7 @@ QgsRasterIdentifyResult QgsGdalProvider::identify( const QgsPoint & thePoint, Id
{
results.insert( i, value );
}
delete myBlock;
}
return QgsRasterIdentifyResult( QgsRasterDataProvider::IdentifyFormatValue, results );
}
Expand Down

0 comments on commit f3ab812

Please sign in to comment.