Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!carroll From: carroll@s.cs.uiuc.edu Newsgroups: comp.windows.x Subject: Re: Free data from XGetWindowProperty Message-ID: <216500010@s.cs.uiuc.edu> Date: 22 Jun 89 20:24:00 GMT References: <3174@ncsuvx.ncsu.edu> Lines: 20 Nf-ID: #R:ncsuvx.ncsu.edu:3174:s.cs.uiuc.edu:216500010:000:1086 Nf-From: s.cs.uiuc.edu!carroll Jun 22 15:24:00 1989 RE: XFreeFont() vs. XFreeFontInfo() Apparently I stated myself badly originally. The statement "the manual says to use XFreeFontInfo()" is on page 94, "Xlib - C Library X11, Release 3" under the function XQueryFont(), where it says "To free this data, use XFreeFontInfo()" I can't use XFreeFont(), because what I want to free is the _info_, not the font. I use XLoadQueryFont(), which does an implicit XQueryFont() (which is why the above section is relevant). I then copy over the bits that I need, and want to dump the _info_ structure because I'm done with it. The key question is, "If I use XQueryFont() (either directly or through XLoadQueryFont()), instead of XListFontsWithInfo(), what do I pass for the names argument in XFreeFontInfo()?". rws told me that the answer is NULL, with an actual_count of 1. I submit that this is non-obvious from reading the manual. Alan M. Carroll "And there you are carroll@s.cs.uiuc.edu Saying 'We have the Moon, so now the Stars...'" CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll