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

@@ -55,6 +55,8 @@ void luaCallInit();
void luaCallUpdate();
void luaCallDraw();
void luaCallExit();
void luaCallLoad( const char* type, void* object );
void luaCallUnload( const char* type, void* object );
void luaRegister();
void platformDefineGlobals();
void luaPlatformRegister();
@@ -119,6 +121,7 @@ REILUAPI void uluaPushFont( lua_State* L, Font font );
REILUAPI void uluaPushGlyphInfo( lua_State* L, GlyphInfo glyph );
REILUAPI void uluaPushWave( lua_State* L, Wave wave );
REILUAPI void uluaPushSound( lua_State* L, Sound sound );
REILUAPI void uluaPushSoundAlias( lua_State* L, Sound alias );
REILUAPI void uluaPushMusic( lua_State* L, Music music );
REILUAPI void uluaPushLight( lua_State* L, Light light );
REILUAPI void uluaPushMaterial( lua_State* L, Material material );
@@ -128,6 +131,24 @@ REILUAPI void uluaPushModelAnimation( lua_State* L, ModelAnimation modelAnimatio
REILUAPI void uluaPushRLRenderBatch( lua_State* L, rlRenderBatch renderBatch );
REILUAPI void uluaPushAutomationEvent( lua_State* L, AutomationEvent event );
REILUAPI void uluaPushAutomationEventList( lua_State* L, AutomationEventList eventList );
/* Unload objects. */
void uluaUnloadBuffer( Buffer* buffer );
void uluaUnloadImage( Image* image );
void uluaUnloadTexture( Texture* texture );
void uluaUnloadRenderTexture( RenderTexture* renderTexture );
void uluaUnloadShader( Shader* shader );
void uluaUnloadFont( Font* font );
void uluaUnloadGlyphInfo( GlyphInfo* glyph );
void uluaUnloadWave( Wave* wave );
void uluaUnloadSound( Sound* sound );
void uluaUnloadSoundAlias( Sound* sound );
void uluaUnloadMusic( Music* music );
void uluaUnloadMaterial( Material* material, bool freeAll );
void uluaUnloadMesh( Mesh* mesh );
void uluaUnloadModel( Model* model );
void uluaUnloadModelAnimation( ModelAnimation* modelAnimation );
void uluaUnloadRLRenderBatch( rlRenderBatch* renderBatch );
void uluaUnloadAutomationEventList( AutomationEventList* eventList );
/* Utils. */
REILUAPI int uluaGetTableLen( lua_State* L, int index );
REILUAPI bool uluaIsNil( lua_State* L, int index );