detach documents when destroying an UiContext

Thu, 28 May 2026 17:45:20 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 28 May 2026 17:45:20 +0200
changeset 1145
57cc5fc047f3
parent 1144
6e9da0736c33
child 1146
35e098a663a7
child 1147
30476eaff3ba

detach documents when destroying an UiContext

ui/common/context.c file | annotate | diff | comparison | revisions
--- a/ui/common/context.c	Wed May 27 15:16:32 2026 +0200
+++ b/ui/common/context.c	Thu May 28 17:45:20 2026 +0200
@@ -109,6 +109,7 @@
 void uic_context_prepare_close(UiContext *ctx) {
     cxListClear(ctx->states);
     cxListClear(ctx->state_widgets);
+    cxListClear(ctx->action_bindings);
 }
 
 void uic_context_destroy(UiContext *ctx, void *document) {
@@ -134,6 +135,8 @@
         h->destructor(h->data);
     }
     
+    uic_context_detach_all(ctx);
+    
     cxMempoolFree(ctx->mp);
 }
 

mercurial