Xft memleak ?

Nikolas Garofil nikolas.garofil at gmail.com
Sat Nov 21 12:39:16 PST 2009


The following code (compiled with "-g3 -O0  -I/usr/include/freetype2
-lX11 -lXft") seems to work perfectly (it returns 0), but when i run
it in valgrind it seems to leak memory. Is there something i should do
before or after XftFontClose ?

#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>

int main(){
 Display* display = XOpenDisplay(NULL);
 int screen = DefaultScreen(display);
 XftFont* font = XftFontOpenName(display, screen, "6x10");
 if(font == NULL) return 1;
 XftFontClose(display, font);
 XCloseDisplay(display);
 return 0;
}



More information about the xorg mailing list