From 00b8b18795679dde5e2b95fe0687d43aab7bc6af Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Wed, 22 Feb 2017 21:24:45 +0000 Subject: [PATCH] =?UTF-8?q?TextView=E2=80=94Plug=20a=20memory=20leak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to Nelson Benitez for pointing this out. https://bugzilla.gnome.org/show_bug.cgi?id=136059 --- gtk/gtktextview.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index a8602caf7c..2a9f20a012 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -6424,6 +6424,8 @@ iter_line_is_rtl (GtkTextIter *iter, GtkTextLayout *layout) const gchar *text = pango_layout_get_text (display->layout); PangoDirection pango_dir = pango_find_base_dir (text, -1); + gtk_text_layout_free_line_display (layout, display); + return pango_dir == PANGO_DIRECTION_RTL; }