I started writing things in SDL - I have never used SDL before about a week ago and have been self-teaching through online tutorials and the SDL API.
I have valgrind setup to check for leaks everytime I build - the only problem is, without any of my code inside the SDL i get a leak of 2150 bytes. Does anybody know what could be causing this.
The valgrind report is as follows:
==3973== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 342 from 5)
==3973== malloc/free: in use at exit: 114,664 bytes in 2,367 blocks.
==3973== malloc/free: 16,478 allocs, 14,111 frees, 2,346,209 bytes allocated.
==3973== For counts of detected errors, rerun with: -v
==3973== searching for pointers to 2,367 not-freed blocks.
==3973== checked 598,768 bytes.
==3973== LEAK SUMMARY:
==3973== definitely lost: 2,370 bytes in 16 blocks.
==3973== possibly lost: 10,784 bytes in 300 blocks.
==3973== still reachable: 101,510 bytes in 2,051 blocks.
==3973== suppressed: 0 bytes in 0 blocks.
int main(int argc, char **argv)
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0)
printf("unable to initialize SDL: %s\n", SDL_GetError());
int optBPP = SDL_VideoModeOK(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT,
DEFAULT_BPP, SDL_HWSURFACE | SDL_DOUBLEBUF);
SDL_Surface* mainWindow = SDL_SetVideoMode(DEFAULT_WINDOW_WIDTH,
DEFAULT_WINDOW_HEIGHT, optBPP, SDL_HWSURFACE | SDL_DOUBLEBUF);
SDL_MapRGB(mainWindow->format, 255, 255, 255));
std::cout << "got here" << std::endl;