src/tree.c

changeset 1109
89ec23988b88
parent 1108
c3bde8ff1c0b
--- a/src/tree.c	Sun Jan 05 13:54:09 2025 +0100
+++ b/src/tree.c	Sun Jan 05 14:03:30 2025 +0100
@@ -844,6 +844,14 @@
     return tree;
 }
 
+void cxTreeFree(CxTree *tree) {
+    if (tree == NULL) return;
+    if (tree->root != NULL) {
+        cxTreeClear(tree);
+    }
+    cxFree(tree->allocator, tree);
+}
+
 CxTree *cxTreeCreateWrapped(
         const CxAllocator *allocator,
         void *root,

mercurial