summaryrefslogtreecommitdiffstats
path: root/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tree.c b/tree.c
index 01844931..8c0adb84 100644
--- a/tree.c
+++ b/tree.c
@@ -921,6 +921,7 @@ val copy_search_tree(val tree)
val ntree = cobj(coerce(mem_t *, ntr), tree_cls, &tree_ops);
*ntr = *otr;
ntr->root = nroot;
+ gc_hint(tree);
return ntree;
}
@@ -933,6 +934,7 @@ val make_similar_tree(val tree)
*ntr = *otr;
ntr->root = nil;
ntr->size = ntr->max_size = 0;
+ gc_hint(tree);
return ntree;
}
@@ -1014,6 +1016,8 @@ val copy_tree_iter(val iter)
memcpy(tdid->ti.path, tdis->ti.path, sizeof tdid->ti.path[0] * depth);
+ gc_hint(iter);
+
return iter_copy;
}