practical-tools-for-simple-design icon indicating copy to clipboard operation
practical-tools-for-simple-design copied to clipboard

Fix window icon memory leak and add error handling

Open HeavenManySugar opened this issue 8 months ago • 5 comments

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

image image

HeavenManySugar avatar Jun 16 '24 16:06 HeavenManySugar