]> git.donarmstrong.com Git - lilypond.git/commitdiff
plug 2 pango memory leaks.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 Jan 2007 16:50:59 +0000 (17:50 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 Jan 2007 16:50:59 +0000 (17:50 +0100)
lily/pango-font.cc

index 75103e3b7bbed5651f1e6454e98e69c717e92428..adca7c5b7038cd6cc05bc636daf5b38f41f4eb3c 100644 (file)
@@ -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;
 }