Код:
1 #include <stdlib.h>
2 #include <X11/Xlib.h>
3 #include <GL/glx.h>
4 int main()
5 {
6 Display *display;
7 int screen_number;
8 GLXFBConfig *glxfb_configs;
9 int configs_number;
10 display = XOpenDisplay(NULL);
11 if (display == NULL) return EXIT_FAILURE;
12 screen_number = DefaultScreen(display);
13 glxfb_configs = glXGetFBConfigs(display, screen_number, &configs_number);
14 XFree(glxfb_configs);
15 XCloseDisplay(display);
16 return EXIT_SUCCESS;
17 }
==32255== LEAK SUMMARY:
==32255== definitely lost: 386 bytes in 10 blocks.
==32255== possibly lost: 0 bytes in 0 blocks.
==32255== still reachable: 4,710 bytes in 6 blocks.
==32255== suppressed: 0 bytes in 0 blocks.
==32312== LEAK SUMMARY:
==32312== definitely lost: 0 bytes in 0 blocks.
==32312== possibly lost: 0 bytes in 0 blocks.
==32312== still reachable: 22 bytes in 1 blocks.
==32312== suppressed: 0 bytes in 0 blocks.
Вопросы: откуда утечки? что я делаю не так?