diff --git a/Geodatenbezug/Processors/LayerExtensions.cs b/Geodatenbezug/Processors/LayerExtensions.cs index 5879863..e9f97b1 100644 --- a/Geodatenbezug/Processors/LayerExtensions.cs +++ b/Geodatenbezug/Processors/LayerExtensions.cs @@ -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());