How are Custom Resources (RefCounted) freed?

In Godot, “RefCounted” resources are automatically freed when their reference count drops to zero. If your nodes or objects holding references to these resources are never deleted, the resources will remain in memory. To avoid potential memory leaks, ensure that you release references to resources when they are no longer needed by setting them to “null” or removing them from collections.

2 Likes