add ui_mainthread_app_unref

Sun, 31 May 2026 14:09:31 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 31 May 2026 14:09:31 +0200
changeset 1155
066fc6df92d1
parent 1154
8f44450932d5
child 1156
cc488843c92b

add ui_mainthread_app_unref

ui/common/wrapper.c file | annotate | diff | comparison | revisions
ui/common/wrapper.h file | annotate | diff | comparison | revisions
--- a/ui/common/wrapper.c	Sat May 30 21:18:29 2026 +0200
+++ b/ui/common/wrapper.c	Sun May 31 14:09:31 2026 +0200
@@ -71,6 +71,14 @@
     ui_call_mainthread(doc_unref, doc);
 }
 
+static int app_unref(void *unused) {
+    ui_app_unref();
+    return 0;
+}
+
+void ui_mainthread_app_unref() {
+    ui_call_mainthread(app_unref, NULL);
+}
 
 /* ---------------------------- UiList ---------------------------- */
 
--- a/ui/common/wrapper.h	Sat May 30 21:18:29 2026 +0200
+++ b/ui/common/wrapper.h	Sun May 31 14:09:31 2026 +0200
@@ -44,6 +44,7 @@
 
 UIEXPORT void ui_mainthread_object_unref(UiObject *obj);
 UIEXPORT void ui_mainthread_document_unref(void *doc);
+UIEXPORT void ui_mainthread_app_unref();
 
 UIEXPORT void* ui_list_get_data(UiList *list);
 UIEXPORT void* ui_list_get_iter(UiList *list);

mercurial