# HG changeset patch # User Olaf Wintermann # Date 1779983120 -7200 # Node ID 57cc5fc047f33d6c588ec7ffd2808d5bff70cc7c # Parent 6e9da0736c3365a9fa43471635ee6fb08dcf6a18 detach documents when destroying an UiContext diff -r 6e9da0736c33 -r 57cc5fc047f3 ui/common/context.c --- 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); }