free texture data from stb_image

This commit is contained in:
veclav talica 2024-08-27 14:48:08 +03:00
parent 1952ab60ff
commit ca0305feab

View File

@ -297,6 +297,7 @@ void textures_cache_deinit(struct texture_cache *cache) {
/* free cache hashes */
for (size_t i = 0; i < shlenu(cache->hash); ++i) {
stbi_image_free(cache->hash[i].value.data->pixels);
SDL_FreeSurface(cache->hash[i].value.data);
}
shfree(cache->hash);