Why does valgrind say basic SDL program is leaking memory?
Here is the SDL program: #include <SDL/SDL.h> int main(int argc, char** argv){ SDL_Init(SDL_INIT_VIDEO); SDL_Surface* screen = SDL_SetVideoMode(640, 480, 16, SDL_HWSURFACE); SDL_Quit(); return 0; } Compiled with the command: g++ -o test test.cpp -lSDL And here is the output of valgrind: christian@christian-laptop:~/cpp/tetris$ valgrind --leak-check=full ./test ==3271== Memcheck, a memory error detector ==3271== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==3271== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info ==3271== Command: ./test ==3271== =