Skip to content

Commit

Permalink
Replace dispose with using
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr committed Apr 30, 2024
1 parent e2c19b0 commit edc50f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Geodatenbezug/Processors/LayerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ public static void ConvertMultiPartToSinglePartGeometry(this Layer layer)
{
for (var j = 0; j < geometry.GetGeometryCount(); j++)
{
var newFeature = feature.Clone();
using var newFeature = feature.Clone();
newFeature.SetFID(-1);
newFeature.SetGeometry(geometry.GetGeometryRef(j));
layer.CreateFeature(newFeature);
newFeature.Dispose();
}

layer.DeleteFeature(feature.GetFID());
Expand Down

0 comments on commit edc50f0

Please sign in to comment.