pango r2746 - in trunk: . pango
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2746 - in trunk: . pango
- Date: Fri, 28 Nov 2008 17:34:57 +0000 (UTC)
Author: behdad
Date: Fri Nov 28 17:34:57 2008
New Revision: 2746
URL: http://svn.gnome.org/viewvc/pango?rev=2746&view=rev
Log:
2008-11-28 Behdad Esfahbod <behdad gnome org>
Bug 562574 â Pangocariowin32 is leaking every cairo font it ever
creates
* pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_finalize):
* pango/pangocairo-win32font.c (pango_cairo_win32_font_finalize):
Finalize shared pangocairo font resources. Oops!
* pango/pangocairo-font.c (_pango_cairo_font_private_finalize):
Protect against multiple calls to finalize. This is practiced by the
pangocairo-fcfont when a font is shutdown and then finalized.
Modified:
trunk/ChangeLog
trunk/pango/pangocairo-atsuifont.c
trunk/pango/pangocairo-fcfont.c
trunk/pango/pangocairo-font.c
trunk/pango/pangocairo-win32font.c
Modified: trunk/pango/pangocairo-atsuifont.c
==============================================================================
--- trunk/pango/pangocairo-atsuifont.c (original)
+++ trunk/pango/pangocairo-atsuifont.c Fri Nov 28 17:34:57 2008
@@ -174,6 +174,10 @@
static void
pango_cairo_atsui_font_finalize (GObject *object)
{
+ PangoCairoATSUIFont *cafont = (PangoCairoATSUIFont *) object;
+
+ _pango_cairo_font_private_finalize (&cafont->cf_priv);
+
G_OBJECT_CLASS (pango_cairo_atsui_font_parent_class)->finalize (object);
}
@@ -191,7 +195,7 @@
}
static void
-pango_cairo_atsui_font_init (PangoCairoATSUIFont *cafont)
+pango_cairo_atsui_font_init (PangoCairoATSUIFont *cafont G_GNUC_UNUSED)
{
}
Modified: trunk/pango/pangocairo-fcfont.c
==============================================================================
--- trunk/pango/pangocairo-fcfont.c (original)
+++ trunk/pango/pangocairo-fcfont.c Fri Nov 28 17:34:57 2008
@@ -88,7 +88,7 @@
static void
pango_cairo_fc_font_finalize (GObject *object)
{
- PangoCairoFcFont *cffont = (PangoCairoFcFont *) (object);
+ PangoCairoFcFont *cffont = (PangoCairoFcFont *) object;
_pango_cairo_font_private_finalize (&cffont->cf_priv);
@@ -162,7 +162,7 @@
}
static void
-pango_cairo_fc_font_init (PangoCairoFcFont *cffont)
+pango_cairo_fc_font_init (PangoCairoFcFont *cffont G_GNUC_UNUSED)
{
}
Modified: trunk/pango/pangocairo-font.c
==============================================================================
--- trunk/pango/pangocairo-font.c (original)
+++ trunk/pango/pangocairo-font.c Fri Nov 28 17:34:57 2008
@@ -560,14 +560,18 @@
if (cf_priv->scaled_font)
cairo_scaled_font_destroy (cf_priv->scaled_font);
+ cf_priv->scaled_font = NULL;
_pango_cairo_font_hex_box_info_destroy (cf_priv->hbi);
+ cf_priv->hbi = NULL;
if (cf_priv->glyph_extents_cache)
g_free (cf_priv->glyph_extents_cache);
+ cf_priv->glyph_extents_cache = NULL;
g_slist_foreach (cf_priv->metrics_by_lang, (GFunc)free_metrics_info, NULL);
g_slist_free (cf_priv->metrics_by_lang);
+ cf_priv->metrics_by_lang = NULL;
}
gboolean
Modified: trunk/pango/pangocairo-win32font.c
==============================================================================
--- trunk/pango/pangocairo-win32font.c (original)
+++ trunk/pango/pangocairo-win32font.c Fri Nov 28 17:34:57 2008
@@ -164,6 +164,10 @@
static void
pango_cairo_win32_font_finalize (GObject *object)
{
+ PangoCairoWin32Font *cwfont = (PangoCairoWin32Font *) object;
+
+ _pango_cairo_font_private_finalize (&cwfont->cf_priv);
+
G_OBJECT_CLASS (pango_cairo_win32_font_parent_class)->finalize (object);
}
@@ -225,7 +229,7 @@
}
static void
-pango_cairo_win32_font_init (PangoCairoWin32Font *cwfont)
+pango_cairo_win32_font_init (PangoCairoWin32Font *cwfont G_GNUC_UNUSED)
{
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]