Skip to content
Permalink
Browse files
fix memory like in mesh rasterize processing
  • Loading branch information
vcloarec authored and github-actions committed Nov 5, 2021
1 parent effd0e1 commit e0c8e319f5adb80089df4eb1e61813040d82aa59
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 e0c8e31

Please sign in to comment.