From edc50f00260329e5838527120770c4f47fe15e9b Mon Sep 17 00:00:00 2001 From: tschumpr Date: Tue, 30 Apr 2024 08:51:15 +0200 Subject: [PATCH] Replace dispose with using --- Geodatenbezug/Processors/LayerExtensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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());