gimp r26325 - in branches/gimp-2-4: . app/text
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26325 - in branches/gimp-2-4: . app/text
- Date: Sun, 27 Jul 2008 20:52:29 +0000 (UTC)
Author: neo
Date: Sun Jul 27 20:52:29 2008
New Revision: 26325
URL: http://svn.gnome.org/viewvc/gimp?rev=26325&view=rev
Log:
2008-07-27 Sven Neumann <sven gimp org>
Merged from trunk:
* app/text/gimptext-compat.c (text_get_extents): applied the
same
workaround for a memory leak in PangoFT2 (bug #143542) as was
applied long ago in gimptextlayout.c.
Modified:
branches/gimp-2-4/ChangeLog
branches/gimp-2-4/app/text/gimptext-compat.c
Modified: branches/gimp-2-4/app/text/gimptext-compat.c
==============================================================================
--- branches/gimp-2-4/app/text/gimptext-compat.c (original)
+++ branches/gimp-2-4/app/text/gimptext-compat.c Sun Jul 27 20:52:29 2008
@@ -154,6 +154,17 @@
context = pango_ft2_font_map_create_context (PANGO_FT2_FONT_MAP (fontmap));
g_object_unref (fontmap);
+ /* Workaround for bug #143542 (PangoFT2Fontmap leak),
+ * see also bug #148997 (Text layer rendering leaks font file descriptor):
+ *
+ * Calling pango_ft2_font_map_substitute_changed() causes the
+ * font_map cache to be flushed, thereby removing the circular
+ * reference that causes the leak.
+ */
+ g_object_weak_ref (G_OBJECT (context),
+ (GWeakNotify) pango_ft2_font_map_substitute_changed,
+ fontmap);
+
layout = pango_layout_new (context);
g_object_unref (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]