PATCH 21.5
This fixes some of the memory leaks that valgrind complains about.
There are more lurking; stand by.
lwlib/ChangeLog addition:
2007-09-15 Jerry James <james(a)xemacs.org>
* xlwmenu.c (XlwMenuDestroy): Release XftFont resources
* xlwtabs.c (TabsDestroy): Ditto
xemacs-21.5 source patch:
Diff command: cvs -q diff -uN
Files affected: lwlib/xlwtabs.c
===================================================================
RCS lwlib/xlwmenu.c
===================================================================
RCS
Index: lwlib/xlwmenu.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwmenu.c,v
retrieving revision 1.43
diff -d -u -u -r1.43 xlwmenu.c
--- lwlib/xlwmenu.c 2006/11/17 02:50:22 1.43
+++ lwlib/xlwmenu.c 2007/09/15 22:56:29
@@ -3351,6 +3351,10 @@
XFreePixmap (XtDisplay (mw), mw->menu.gray_pixmap);
mw->menu.gray_pixmap = (Pixmap) -1;
+#ifdef USE_XFT_MENUBARS
+ XftFontClose (XtDisplay (mw), mw->menu.renderFont);
+#endif
+
/* Don't free mw->menu.contents because that comes from our creator.
The `*_stack' elements are just pointers into `contents' so leave
that alone too. But free the stacks themselves. */
Index: lwlib/xlwtabs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwtabs.c,v
retrieving revision 1.9
diff -d -u -u -r1.9 xlwtabs.c
--- lwlib/xlwtabs.c 2006/11/17 02:50:22 1.9
+++ lwlib/xlwtabs.c 2007/09/15 22:56:29
@@ -572,7 +572,11 @@
static void
TabsDestroy(Widget w)
{
- TabsFreeGCs((TabsWidget)w) ;
+ TabsWidget tw = (TabsWidget) w;
+#ifdef USE_XFT_TABS
+ XftFontClose (XtDisplay (w), tw->tabs.renderFont);
+#endif /* ! USE_XFT_TABS */
+ TabsFreeGCs (tw) ;
}
--
Jerry James
http://loganjerry.googlepages.com/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches