Fix 2 memory leaks;

This commit is contained in:
bjorn 2020-05-23 13:03:16 -06:00
parent 86ad4f654c
commit d6abcdfb0e
2 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,7 @@ void lovrFontDestroy(void* ref) {
for (size_t i = 0; i < font->atlas.glyphs.length; i++) {
lovrRelease(TextureData, font->atlas.glyphs.data[i].data);
}
arr_free(&font->atlas.glyphs);
map_free(&font->atlas.glyphMap);
map_free(&font->kerning);
}

View File

@ -2663,6 +2663,7 @@ void lovrShaderDestroy(void* ref) {
for (BlockType type = BLOCK_UNIFORM; type <= BLOCK_COMPUTE; type++) {
for (size_t i = 0; i < shader->blocks[type].length; i++) {
lovrRelease(Buffer, shader->blocks[type].data[i].source);
arr_free(&shader->blocks[type].data[i].uniforms);
}
}
arr_free(&shader->uniforms);