Skip to content
Permalink
Browse files
fix memory leak in mesh rasterize processing (#45892)
Co-authored-by: vcloarec <vcloarec@gmail.com>
  • Loading branch information
qgis-bot and vcloarec committed Nov 5, 2021
1 parent effd0e1 commit e858c9fb87c94236118edf5c37469e19cbf21556
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/analysis/processing/qgsalgorithmexportmesh.cpp
@@ -865,17 +865,17 @@ QVariantMap QgsMeshRasterizeAlgorithm::processAlgorithm( const QVariantMap &para

if ( dataGroup.datasetValues.isValid() )
{
QgsRasterBlock *block = QgsMeshUtils::exportRasterBlock(
mTriangularMesh,
dataGroup.datasetValues,
dataGroup.activeFaces,
dataGroup.metadata.dataType(),
mTransform,
pixelSize,
extent,
&rasterBlockFeedBack );

rasterDataProvider->writeBlock( block, i + 1 );
std::unique_ptr<QgsRasterBlock> block( QgsMeshUtils::exportRasterBlock(
mTriangularMesh,
dataGroup.datasetValues,
dataGroup.activeFaces,
dataGroup.metadata.dataType(),
mTransform,
pixelSize,
extent,
&rasterBlockFeedBack ) );

rasterDataProvider->writeBlock( block.get(), i + 1 );
rasterDataProvider->setNoDataValue( i + 1, block->noDataValue() );
}
else

0 comments on commit e858c9f

Please sign in to comment.