Skip to content

Commit

Permalink
Don't leak the vector layer clone
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jun 5, 2019
1 parent 12094db commit 27e3b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayerutils.cpp
Expand Up @@ -495,7 +495,7 @@ QgsFeatureList QgsVectorLayerUtils::createFeatures( const QgsVectorLayer *layer,
// If the layer is filtered, get unique values from an unfiltered clone
if ( ! layer->subsetString().isEmpty() )
{
QgsVectorLayer *unfilteredClone { layer->clone( ) };
std::unique_ptr<QgsVectorLayer> unfilteredClone { layer->clone( ) };
unfilteredClone->setSubsetString( QString( ) );
uniqueValueCaches[ idx ] = unfilteredClone->uniqueValues( idx );
}
Expand Down

0 comments on commit 27e3b1b

Please sign in to comment.