From 0d4db96f6090884b7cebf6279431f30d0c4f45af Mon Sep 17 00:00:00 2001 From: david-swift Date: Wed, 3 Sep 2025 13:35:29 +0200 Subject: [PATCH] Fix crashing when removing items from ForEach --- Sources/Core/View/ForEach.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/Core/View/ForEach.swift b/Sources/Core/View/ForEach.swift index 4a2b565..fe5caaa 100644 --- a/Sources/Core/View/ForEach.swift +++ b/Sources/Core/View/ForEach.swift @@ -61,7 +61,6 @@ public struct ForEach: AdwaitaWidget where Element: Identifiable { functions: .init { index in let child = contentStorage[safe: index]?.opaquePointer gtk_box_remove(widget, child?.cast()) - g_object_unref(child?.cast()) contentStorage.remove(at: index) } insert: { index, element in let child = content(element).storage(data: data, type: type)