Fix memory leak (closes bug 1191328)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-05-21 20:18:25 +00:00
parent 3f694ff5f2
commit 6811251bfc

View File

@@ -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