diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-09-08 00:05:54 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-09-08 00:05:54 +0000 |
commit | d1826e7b5835c4fea8f2e86919a8ca74adff6ff6 (patch) | |
tree | 93bf9c311b3b294287f2d1ec486446975e61523b | |
parent | c7c8da4617da9c3069725ca4bfadabb1f5924aba (diff) | |
download | pango-d1826e7b5835c4fea8f2e86919a8ca74adff6ff6.tar.gz |
Part of Bug 474708 – pangocairo leaks memory
2007-09-07 Behdad Esfahbod <behdad@gnome.org>
Part of Bug 474708 – pangocairo leaks memory
* pango/pangocairo-font.c
(_pango_cairo_font_private_get_hex_box_info):
Fix a couple leaks.
* pango/pangocairo-atsui.h:
* pango/pangocairo-atsuifontmap.c
(pango_cairo_atsui_font_map_finalize):
* pango/pangocairo-fc.h:
* pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_finalize):
* pango/pangocairo-win32.h:
* pango/pangocairo-win32fontmap.c
(pango_cairo_win32_font_map_finalize):
Remove unused leftover renderer variable.
* pango/pangofc-fontmap.c (pango_fc_font_map_finalize): Fix thinko.
svn path=/trunk/; revision=2424
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | pango/pangocairo-atsui.h | 2 | ||||
-rw-r--r-- | pango/pangocairo-atsuifontmap.c | 3 | ||||
-rw-r--r-- | pango/pangocairo-fc.h | 1 | ||||
-rw-r--r-- | pango/pangocairo-fcfontmap.c | 3 | ||||
-rw-r--r-- | pango/pangocairo-font.c | 2 | ||||
-rw-r--r-- | pango/pangocairo-win32.h | 2 | ||||
-rw-r--r-- | pango/pangocairo-win32fontmap.c | 3 | ||||
-rw-r--r-- | pango/pangofc-fontmap.c | 2 |
9 files changed, 23 insertions, 15 deletions
@@ -1,5 +1,25 @@ 2007-09-07 Behdad Esfahbod <behdad@gnome.org> + Part of Bug 474708 – pangocairo leaks memory + + * pango/pangocairo-font.c + (_pango_cairo_font_private_get_hex_box_info): + Fix a couple leaks. + + * pango/pangocairo-atsui.h: + * pango/pangocairo-atsuifontmap.c + (pango_cairo_atsui_font_map_finalize): + * pango/pangocairo-fc.h: + * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_finalize): + * pango/pangocairo-win32.h: + * pango/pangocairo-win32fontmap.c + (pango_cairo_win32_font_map_finalize): + Remove unused leftover renderer variable. + + * pango/pangofc-fontmap.c (pango_fc_font_map_finalize): Fix thinko. + +2007-09-07 Behdad Esfahbod <behdad@gnome.org> + * pango/pangox-fontcache.c (free_cache_entry), (pango_x_font_cache_free), (pango_x_font_cache_new), (pango_x_font_cache_load): diff --git a/pango/pangocairo-atsui.h b/pango/pangocairo-atsui.h index 25613a01..6b97ce88 100644 --- a/pango/pangocairo-atsui.h +++ b/pango/pangocairo-atsui.h @@ -38,8 +38,6 @@ struct _PangoCairoATSUIFontMap { PangoATSUIFontMap parent_instance; - PangoRenderer *renderer; - gdouble dpi; }; diff --git a/pango/pangocairo-atsuifontmap.c b/pango/pangocairo-atsuifontmap.c index 0c3e6390..3f0abae1 100644 --- a/pango/pangocairo-atsuifontmap.c +++ b/pango/pangocairo-atsuifontmap.c @@ -84,9 +84,6 @@ pango_cairo_atsui_font_map_finalize (GObject *object) { PangoCairoATSUIFontMap *cafontmap = PANGO_CAIRO_ATSUI_FONT_MAP (object); - if (cafontmap->renderer) - g_object_unref (cafontmap->renderer); - G_OBJECT_CLASS (pango_cairo_atsui_font_map_parent_class)->finalize (object); } diff --git a/pango/pangocairo-fc.h b/pango/pangocairo-fc.h index 82a6b7ec..74f39bab 100644 --- a/pango/pangocairo-fc.h +++ b/pango/pangocairo-fc.h @@ -40,7 +40,6 @@ struct _PangoCairoFcFontMap double dpi; FT_Library library; - PangoRenderer *renderer; }; GType pango_cairo_fc_font_map_get_type (void) G_GNUC_CONST; diff --git a/pango/pangocairo-fcfontmap.c b/pango/pangocairo-fcfontmap.c index 967ca8f4..98b64e7c 100644 --- a/pango/pangocairo-fcfontmap.c +++ b/pango/pangocairo-fcfontmap.c @@ -74,9 +74,6 @@ pango_cairo_fc_font_map_finalize (GObject *object) { PangoCairoFcFontMap *cffontmap = (PangoCairoFcFontMap *) (object); - if (cffontmap->renderer) - g_object_unref (cffontmap->renderer); - FT_Done_FreeType (cffontmap->library); G_OBJECT_CLASS (pango_cairo_fc_font_map_parent_class)->finalize (object); diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c index 3ca4073e..8c6ab66b 100644 --- a/pango/pangocairo-font.c +++ b/pango/pangocairo-font.c @@ -404,6 +404,7 @@ _pango_cairo_font_private_get_hex_box_info (PangoCairoFontPrivate *cf_priv) g_object_unref (context); } + pango_font_description_free (desc); cairo_font_options_destroy (font_options); @@ -469,6 +470,7 @@ _pango_cairo_font_private_get_hex_box_info (PangoCairoFontPrivate *cf_priv) hbi->box_descent = HINT_Y (hbi->box_descent); } + cf_priv->hbi = hbi; return hbi; } diff --git a/pango/pangocairo-win32.h b/pango/pangocairo-win32.h index f95f4fb9..7a71c0a2 100644 --- a/pango/pangocairo-win32.h +++ b/pango/pangocairo-win32.h @@ -39,8 +39,6 @@ struct _PangoCairoWin32FontMap PangoWin32FontMap parent_instance; double dpi; - - PangoRenderer *renderer; }; GType pango_cairo_win32_font_map_get_type (void) G_GNUC_CONST; diff --git a/pango/pangocairo-win32fontmap.c b/pango/pangocairo-win32fontmap.c index 6d097df3..027b5ac5 100644 --- a/pango/pangocairo-win32fontmap.c +++ b/pango/pangocairo-win32fontmap.c @@ -72,9 +72,6 @@ pango_cairo_win32_font_map_finalize (GObject *object) { PangoCairoWin32FontMap *cwfontmap = PANGO_CAIRO_WIN32_FONT_MAP (object); - if (cwfontmap->renderer) - g_object_unref (cwfontmap->renderer); - G_OBJECT_CLASS (pango_cairo_win32_font_map_parent_class)->finalize (object); } diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 267dc483..8e2a3266 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -554,7 +554,7 @@ font_hash_key_for_context (PangoFcFontMap *fcfontmap, key->context_key = NULL; } -/* Add a mapping from xfont->font_pattern to xfont */ +/* Add a mapping from fcfont->font_pattern to fcfont */ static void pango_fc_font_map_add (PangoFcFontMap *fcfontmap, PangoContext *context, |