fix incorrect UiVar destruction newapi

Wed, 30 Oct 2024 10:14:47 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 30 Oct 2024 10:14:47 +0100
branch
newapi
changeset 372
4657ec1229f2
parent 371
8c028965410a
child 373
2eede3d98aba

fix incorrect UiVar destruction

ui/common/context.c file | annotate | diff | comparison | revisions
--- a/ui/common/context.c	Tue Oct 29 17:52:06 2024 +0100
+++ b/ui/common/context.c	Wed Oct 30 10:14:47 2024 +0100
@@ -201,7 +201,7 @@
     var->from = NULL;
     var->from_ctx = ctx;
 
-    cxMempoolRegister(ctx->mp, var, (cx_destructor_func)uic_unbind_var);
+    cxMempoolSetDestructor(var, (cx_destructor_func)uic_unbind_var);
 
     if(!ctx->vars_unbound) {
         ctx->vars_unbound = cxHashMapCreate(ctx->allocator, CX_STORE_POINTERS, 16);

mercurial