mirror of https://github.com/bjornbytes/lovr.git
Fix 2 memory leaks;
This commit is contained in:
parent
86ad4f654c
commit
d6abcdfb0e
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue