From 4ca1492f1b6a9172b1dca88aecf1d6e7394ac5d7 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 20 Oct 2009 22:24:59 -0700 Subject: 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. --- query.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'query.cc') 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); +} -- cgit v1.2.3