Skip to content
Permalink
Browse files

fix some memory leaks

  • Loading branch information
minorua committed Apr 22, 2013
1 parent cbea2d4 commit f3ab81287c2cd8296e7230ef10038cba85d4523a
@@ -77,6 +77,8 @@ QgsContrastEnhancement::QgsContrastEnhancement( const QgsContrastEnhancement& ce

QgsContrastEnhancement::~QgsContrastEnhancement()
{
delete [] mLookupTable;
delete mContrastEnhancementFunction;
}
/*
*
@@ -219,6 +219,7 @@ QgsRasterBandStats QgsRasterInterface::bandStatistics( int theBandNo,
myMean += myDelta / myRasterBandStats.elementCount;
mySumOfSquares += myDelta * ( myValue - myMean );
}
delete blk;
}
}

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

@@ -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;
}

@@ -971,6 +971,7 @@ QgsRasterIdentifyResult QgsGdalProvider::identify( const QgsPoint & thePoint, Id
{
results.insert( i, value );
}
delete myBlock;
}
return QgsRasterIdentifyResult( QgsRasterDataProvider::IdentifyFormatValue, results );
}

0 comments on commit f3ab812

Please sign in to comment.
You can’t perform that action at this time.