RL.load and RL.unload functions for memory leak debugging. SoundAlias garbage collection.

This commit is contained in:
jussi
2025-05-24 23:56:42 +03:00
parent 913b8f8820
commit e26bb8603c
11 changed files with 316 additions and 59 deletions

View File

@@ -438,8 +438,7 @@ Unload font from GPU memory (VRAM)
int ltextUnloadFont( lua_State* L ) {
Font* font = uluaGetFont( L, 1 );
UnloadFont( *font );
memset( font, 0, sizeof( Font ) );
uluaUnloadFont( font );
return 0;
}
@@ -905,7 +904,7 @@ Unload glyphInfo image from CPU memory (RAM)
int ltextUnloadGlyphInfo( lua_State* L ) {
GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
unloadGlyphInfo( glyph );
uluaUnloadGlyphInfo( glyph );
return 0;
}