So, with Nodes, they are queue freed when the parent destroys them.
With Objects, I can do:
var bullet_script = load("BulletScript.gd")
bullet = bullet_script.new()
and then:
bullet.free() when I don't need it anymore, to free the memory like you would do in C++.
But with classes, I do
class PlayerInfo:
var name
# etc.
...
player_info = PlayerInfo.new()
If I then try to free the object with:
player_info.free()
I get the error message:
Attempted to free a reference.
Which I guess refers to an instance of the Reference class?
Does this means that the object will be freed automatically by the garbage collector?