free texture data from stb_image
This commit is contained in:
parent
1952ab60ff
commit
ca0305feab
@ -297,6 +297,7 @@ void textures_cache_deinit(struct texture_cache *cache) {
|
|||||||
|
|
||||||
/* free cache hashes */
|
/* free cache hashes */
|
||||||
for (size_t i = 0; i < shlenu(cache->hash); ++i) {
|
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);
|
SDL_FreeSurface(cache->hash[i].value.data);
|
||||||
}
|
}
|
||||||
shfree(cache->hash);
|
shfree(cache->hash);
|
||||||
|
Loading…
Reference in New Issue
Block a user