mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
notmuch dump: Free each message as it's used.
Previously we were leaking[*] memory in that the memory footprint of a "notmuch dump" run would continue to grow until the output was complete, and then finally all the memory would be freed. Now, the memory footprint is small and constant, O(1) rather than O(n) in the number of messages. [*] Not leaking in a valgrind sense---every byte was still carefully being accounted for and freed eventually.
This commit is contained in:
parent
4ca1492f1b
commit
aad13c3ac9
1 changed files with 2 additions and 0 deletions
|
@ -431,6 +431,8 @@ dump_command (int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (output, ")\n");
|
fprintf (output, ")\n");
|
||||||
|
|
||||||
|
notmuch_message_destroy (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch_query_destroy (query);
|
notmuch_query_destroy (query);
|
||||||
|
|
Loading…
Reference in a new issue