Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!mcnc!thorin!fillmore!alexande From: alexande@fillmore.cs.unc.edu (Geoffrey D. Alexander) Newsgroups: comp.windows.x Subject: Freeing an XFontStruct Keywords: Xlib, XQueryFont, XFreeFont, XFreeFontInfo Message-ID: <18159@thorin.cs.unc.edu> Date: 17 Dec 90 20:29:43 GMT Sender: news@thorin.cs.unc.edu Lines: 14 I am obtaining an XFontStruct via the following code: font_struct=XQueryFont(Xdata->display,XGContextFromGC(Xdata->gc)); After using the data in the XFontStruct, I need to free the XFontStruct. I can't use XFreeFont as this also unloads the font. I've also looked at using XFreeFontInfo, but it doesn't seem to apply directly. Looking at the code for XFreeFontInfo, it seems that XFreeFontInfo(NULL,font_struct,1) will work. However, I'm not real comfortable with this. Does anyone know the "proper" way to free an XFontStruct without unloading the font? Thanks, Geoff Alexander alexande@cs.unc.edu