Skip to content
Permalink
Browse files

Merge pull request #548 from minorua/raster_memory_leaks

Fix some memory leaks Fix #6795
  • Loading branch information
NathanW2 committed Apr 22, 2013
2 parents 2073f87 + f3ab812 commit 13d35ac3f08453c47966141bf55144e1e52cab59
@@ -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 13d35ac

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