I am just getting started with the X11 windowing system. I am trying to make a simple hello world for OpenGL that does not leak memory.
I am currently developing in C++ on Ubuntu 12.04 running in a virtual machine with valgrind. In the past, I have had problems with valgrind reporting many false positive errors in virtual machines, while not doing so on real ones.
I have tried a few simple OpenGL programs, but the one that I found most complete in terms of memory checking (this one), still leaks at least 25KB. I have not had the opportunity to test on a real machine, but given the simple nature of the program, I still suspect it is actually leaking and not a false positive (also I can dike out certain calls and it reports no leaks).
I am asking for a pointer to:
1: An exhaustive list of functions for X. I would like to answer my questions from the documentation. For example, Googling "XFree" will get you nowhere. I have been unable to find a complete documentation.
2: A trivial OpenGL program with an X backend that properly handles resources with no leaks. It can draw, like, a single triangle or something.