Discussion:
[SDL] Must SDL cleanup functions be used before an SDL_Quit() call
actsl
2016-11-07 19:11:51 UTC
Permalink
All the resources will be freed when quitting the program. But it is a matter of good practice to free the resources before quitting. Because one may want to change the code, do something else before quitting, etc. When the resources are not freed, this would be a source of many bugs. Because only when all resources are freed after using them, is the code correctly written. Then it's also easier to debug the program with the tools detecting memory leaks, such as valgrind.

------------------------
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
Loading...