From d1e789372cc76ed3b0791c4238517464309be094 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 16 Jan 2007 17:50:59 +0100 Subject: [PATCH] plug 2 pango memory leaks. --- lily/pango-font.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 75103e3b7b..adca7c5b70 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -104,7 +104,7 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str, char glyph_name[GLYPH_NAME_LEN]; PangoAnalysis const *pa = &(item->analysis); PangoGlyphString *pgs = pango_glyph_string_new (); - + pango_shape (str.c_str () + item->offset, item->length, (PangoAnalysis*) pa, pgs); @@ -215,6 +215,8 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str, tail = SCM_CDRLOC (*tail); } + pango_glyph_string_free (pgs); + pgs = 0; PangoFontDescription *descr = pango_font_describe (pa->font); Real size = pango_font_description_get_size (descr) / (Real (PANGO_SCALE)); @@ -363,6 +365,7 @@ Pango_font::text_stencil (string str, bool tight) const return Stencil (b, exp); } + g_list_free (items); return dest; } -- 2.39.5