From 2c1d95177059c0486fca98ad1d43cdc0df7c5552 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 22 Oct 2021 14:12:18 +0300 Subject: Cleanup: Tidying up per-frame memory allocs No need to use Garbage here to collect per-frame strings and arrays. --- src/ui/documentwidget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/documentwidget.c') diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index b6f3b5ce..4c194608 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -4584,7 +4584,9 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { appendCStr_String(&str, " \u2014 "); appendCStr_String( &str, escape_Color(linkColor_GmDocument(doc, run->linkId, visited_GmLinkPart))); - append_String(&str, collect_String(format_Date(&date, "%b %d"))); + iString *dateStr = format_Date(&date, "%b %d"); + append_String(&str, dateStr); + delete_String(dateStr); } if (!isEmpty_String(&str)) { if (run->isRTL) { -- cgit v1.2.3