aboutsummaryrefslogtreecommitdiffhomepage
path: root/query.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-20 22:24:59 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-20 22:24:59 -0700
commit4ca1492f1b6a9172b1dca88aecf1d6e7394ac5d7 (patch)
treeee7f5a64ee7fae212600d4c1a900462478fb0fdb /query.cc
parentf6c7810945f1bc25b15dee72257c3b68bd0e8a40 (diff)
Add destroy functions for results, message, and tags.
None of these are strictly necessary, (everything was leak-free without them), but notmuch_message_destroy can actually be useful for when one query has many message results, but only one is needed to be live at a time. The destroy functions for results and tags are fairly gratuitous, as there's unlikely to be any benefit from calling them. But they're all easy to add, (all of these functions are just wrappers for talloc_free), and we do so for consistency and completeness.
Diffstat (limited to 'query.cc')
-rw-r--r--query.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/query.cc b/query.cc
index c669fb91..2a1815a7 100644
--- a/query.cc
+++ b/query.cc
@@ -141,3 +141,9 @@ notmuch_results_advance (notmuch_results_t *results)
{
results->iterator++;
}
+
+void
+notmuch_results_destroy (notmuch_results_t *results)
+{
+ talloc_free (results);
+}