ui/gtk/menu.c

changeset 558
62aefa91ffc5
parent 553
90e38db0c755
--- a/ui/gtk/menu.c	Sun Apr 06 14:10:04 2025 +0200
+++ b/ui/gtk/menu.c	Sun Apr 06 14:11:43 2025 +0200
@@ -281,7 +281,7 @@
         cxListAdd(bindings, ls);
         
         // The destruction of the toplevel obj must remove the menulist binding
-        cxMempoolRegister(obj->ctx->mp, ls, menuitem_list_remove_binding);
+        uic_context_add_destructor(obj->ctx, menuitem_list_remove_binding, ls);
         
         ui_update_menuitem_list(ls);
     }
@@ -595,7 +595,7 @@
         cxListAdd(bindings, ls);
         
         // The destruction of the toplevel obj must remove the menulist binding
-        cxMempoolRegister(obj->ctx->mp, ls, menuitem_list_remove_binding);
+        uic_context_add_destructor(obj->ctx, menuitem_list_remove_binding, ls);
         
         ui_update_gmenu_item_list(ls);
     }

mercurial