practical-tools-for-simple-design
practical-tools-for-simple-design copied to clipboard
Fix window icon memory leak and add error handling
This pull request fixes a memory leak in the SetWindowIcon
function by freeing the SDL surface after setting the window icon. Additionally, it adds error handling for failed image loading in the same function.
before:
valgrind --leak-check=full --show-leak-kinds=all --verbose ./Example