From: Julian Smart Date: Sat, 21 May 2005 20:18:25 +0000 (+0000) Subject: Fix memory leak (closes bug 1191328) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6811251bfc825216c41f2653ec3e96ebf92de9f1 Fix memory leak (closes bug 1191328) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/x11/font.cpp b/src/x11/font.cpp index be44d65a0d..5018bc39ed 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -79,10 +79,10 @@ wxXFont::wxXFont() wxXFont::~wxXFont() { - // TODO: why does freeing the font produce a segv??? - // Note that XFreeFont wasn't called in wxWin 1.68 either. - // XFontStruct* fontStruct = (XFontStruct*) m_fontStruct; - // XFreeFont((Display*) m_display, fontStruct); + // Freeing the font used to produce a segv, but + // appears to be OK now (bug fix in X11?) + XFontStruct* fontStruct = (XFontStruct*) m_fontStruct; + XFreeFont((Display*) m_display, fontStruct); } #endif