Don't haemorrhage Pango layouts out of nsfont_paint.

Before:
  LEAK SUMMARY:
     definitely lost: 143,462 bytes in 811 blocks
     indirectly lost: 835,174 bytes in 16,656 blocks
       possibly lost: 104,465 bytes in 1,631 blocks
     still reachable: 3,634,180 bytes in 30,844 blocks
          suppressed: 0 bytes in 0 blocks

After:
  LEAK SUMMARY:
     definitely lost: 57,990 bytes in 258 blocks
     indirectly lost: 218,013 bytes in 5,995 blocks
       possibly lost: 110,118 bytes in 1,837 blocks
     still reachable: 3,637,842 bytes in 30,881 blocks
          suppressed: 0 bytes in 0 blocks
This commit is contained in:
Michael Drake 2016-02-08 14:59:35 +00:00
parent 255361a885
commit 9cb522ce38

View File

@ -250,6 +250,7 @@ bool nsfont_paint(int x, int y, const char *string, size_t length,
nsgtk_set_colour(fstyle->foreground); nsgtk_set_colour(fstyle->foreground);
pango_cairo_show_layout_line(current_cr, line); pango_cairo_show_layout_line(current_cr, line);
g_object_unref(layout);
pango_font_description_free(desc); pango_font_description_free(desc);
return true; return true;