From e26bb8603c5a4053f2790fc7d6ce02b3179f5289 Mon Sep 17 00:00:00 2001 From: jussi Date: Sat, 24 May 2025 23:56:42 +0300 Subject: RL.load and RL.unload functions for memory leak debugging. SoundAlias garbage collection. --- API.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'API.md') diff --git a/API.md b/API.md index 989289a..4786403 100644 --- a/API.md +++ b/API.md @@ -47,6 +47,18 @@ This function will be called before InitWindow. Note! Only place where you shoul --- +> function RL.load() + +This function will be called when loading resource that allocates memory. Usefull for memory leak debugging. Note! Cannot detect all resources, for example material textures. + +--- + +> function RL.unload() + +This function will be called when unloading resource that has allocated memory. Usefull for memory leak debugging. Note! Cannot detect all resources, for example material textures. + +--- + ## Object unloading Some objects allocate memory that needs to be freed when object is no longer needed. By default objects like Textures are unloaded by the Lua garbage collector. It is generatty however recommended to handle this manually in more complex projects. You can change the behavior with SetGCUnload. @@ -261,6 +273,12 @@ Sound --- +> SoundAlias = Userdata + +SoundAlias + +--- + > Music = Userdata Music, audio stream, anything longer than ~10 seconds should be streamed -- cgit v1.2.3