diff --git a/Home.md b/Home.md index 51dca95..c5c39b9 100644 --- a/Home.md +++ b/Home.md @@ -25,8 +25,18 @@ We can keep track of metadata constants in a separate class to not mess things u ![graph](img/module_example.webp) +### RefCounted vs Objects > **Note** By not declaring an extent to a script file, it will automatically extend from [RefCounted](https://docs.godotengine.org/en/stable/classes/class_refcounted.html) type +RefCounted delete itself when not used, opposed to the Object that stay until `free()` or `queue_free()` + +> **Game example** +> A sound created by a monster +> `Sound -> Resource -> RefCounted` +> When the sound is no longer in use it's going to automatically be freed. + +For performance purpose, we will use a lot of RefCounted script, so that every time it's not used, it will be freed. + ## Main classes