Why does valgrind say basic SDL program is leaking memory?

前端 未结 5 483
星月不相逢
星月不相逢 2020-12-01 12:00

Here is the SDL program:

#include 

int main(int argc, char** argv){


  SDL_Init(SDL_INIT_VIDEO);
  SDL_Surface* screen = SDL_SetVideoMode(         


        
5条回答
  •  没有蜡笔的小新
    2020-12-01 12:36

    Singletons are pretty much always a 'leak' with standard implementations. That is usually ok, though, since normally it's not like you want to unload your ability to do things like print to the console.

提交回复
热议问题