summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorjussi2025-05-24 23:56:42 +0300
committerjussi2025-05-24 23:56:42 +0300
commite26bb8603c5a4053f2790fc7d6ce02b3179f5289 (patch)
tree5d6bcc991663b0b60fc5a38179104954892b1286 /API.md
parent913b8f882031893f926b6aba89ec4456cb39a2c0 (diff)
downloadreilua-enhanced-e26bb8603c5a4053f2790fc7d6ce02b3179f5289.tar.gz
reilua-enhanced-e26bb8603c5a4053f2790fc7d6ce02b3179f5289.tar.bz2
reilua-enhanced-e26bb8603c5a4053f2790fc7d6ce02b3179f5289.zip
RL.load and RL.unload functions for memory leak debugging. SoundAlias garbage collection.
Diffstat (limited to 'API.md')
-rw-r--r--API.md18
1 files changed, 18 insertions, 0 deletions
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