Why does valgrind say basic SDL program is leaking memory?

Even for basic OpenGL “hello world” program without the full SDL, Valgrind gives me similar warnings deep inside the OpenGL libraries. It’s peculiar, but I’ve assumed

  • The library implementors know what they’re doing (probably preallocating some small static buffers they never bother to free),
  • Even if they don’t, it’s a one-time leak that’ll be reclaimed by the OS when the program terminates,

and haven’t lost much sleep over it.

Leave a Comment