ui/gtk/toolkit.c

changeset 140
c03c338a7dcf
parent 139
dbde25a5bc53
child 142
46448d38885c
--- a/ui/gtk/toolkit.c	Tue Jan 24 18:46:47 2017 +0100
+++ b/ui/gtk/toolkit.c	Fri Nov 10 17:17:14 2017 +0100
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 2014 Olaf Wintermann. All rights reserved.
+ * Copyright 2017 Olaf Wintermann. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -226,6 +226,14 @@
     free(userdata);
 }
 
+void ui_destroy_boundvar(UiContext *ctx, UiVar *var) {
+    if(var->type == UI_VAR_SPECIAL) {
+        free(var);
+    } else {
+        uic_remove_bound_var(ctx, var);
+    }
+}
+
 void ui_set_active_window(UiObject *obj) {
     active_window = obj;
 }

mercurial