diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-09-08 00:09:49 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-09-08 00:09:49 +0000 |
commit | 677c121fe69e9255d502cd4d843b2618b2a5292a (patch) | |
tree | a7d343e9ed60230d68488c1f366eeee6a1bd02a0 | |
parent | d1826e7b5835c4fea8f2e86919a8ca74adff6ff6 (diff) | |
download | pango-677c121fe69e9255d502cd4d843b2618b2a5292a.tar.gz |
Bug 474708 – pangocairo leaks memory
2007-09-07 Behdad Esfahbod <behdad@gnome.org>
Bug 474708 – pangocairo leaks memory
* pango-view/viewer-pangocairo.c (pangocairo_view_create):
Use pango_cairo_font_map_new() instead of
pango_cairo_font_map_get_default(), so the font map is freed at the
end so we can use valgrind to detect leaks without noise.
svn path=/trunk/; revision=2425
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | pango-view/viewer-pangocairo.c | 2 |
2 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,14 @@ 2007-09-07 Behdad Esfahbod <behdad@gnome.org> + Bug 474708 – pangocairo leaks memory + + * pango-view/viewer-pangocairo.c (pangocairo_view_create): + Use pango_cairo_font_map_new() instead of + pango_cairo_font_map_get_default(), so the font map is freed at the + end so we can use valgrind to detect leaks without noise. + +2007-09-07 Behdad Esfahbod <behdad@gnome.org> + Part of Bug 474708 – pangocairo leaks memory * pango/pangocairo-font.c diff --git a/pango-view/viewer-pangocairo.c b/pango-view/viewer-pangocairo.c index 09f205c0..fc06ccfe 100644 --- a/pango-view/viewer-pangocairo.c +++ b/pango-view/viewer-pangocairo.c @@ -47,7 +47,7 @@ pangocairo_view_create (const PangoViewer *klass) instance->iface = get_default_cairo_viewer_iface (); instance->backend = instance->iface->backend_class->create (instance->iface->backend_class); - instance->fontmap = pango_cairo_font_map_get_default (); + instance->fontmap = pango_cairo_font_map_new (); pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (instance->fontmap), opt_dpi); instance->font_options = cairo_font_options_create (); |