mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
notmuch: unref charset_filter to fix one memory leak
In my test case added g_object_unref(charset_filter) reduces memory consumption over 90% when 'notmuch show --format=text "*"' is executed (~11000 messages, RES ~330M -> ~25M).
This commit is contained in:
parent
ed56fee6e5
commit
ff91aeedc1
1 changed files with 4 additions and 1 deletions
|
@ -471,9 +471,12 @@ show_text_part_content (GMimeObject *part, GMimeStream *stream_out)
|
||||||
/* This result can be NULL for things like "unknown-8bit".
|
/* This result can be NULL for things like "unknown-8bit".
|
||||||
* Don't set a NULL filter as that makes GMime print
|
* Don't set a NULL filter as that makes GMime print
|
||||||
* annoying assertion-failure messages on stderr. */
|
* annoying assertion-failure messages on stderr. */
|
||||||
if (charset_filter)
|
if (charset_filter) {
|
||||||
g_mime_stream_filter_add (GMIME_STREAM_FILTER (stream_filter),
|
g_mime_stream_filter_add (GMIME_STREAM_FILTER (stream_filter),
|
||||||
charset_filter);
|
charset_filter);
|
||||||
|
g_object_unref (charset_filter);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper = g_mime_part_get_content_object (GMIME_PART (part));
|
wrapper = g_mime_part_get_content_object (GMIME_PART (part));
|
||||||
|
|
Loading…
Reference in a new issue