You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, it checks for it, but it doesn't clear it, the method p_instance.get_validated_object() returns nullptr if the instance was freed, but the stored pointer is not null
I couldn't find the binded c++ method for free(). If it's implementation is similar to queue_free, it's only a matter of time before flush_delete_queue() call memdelete() on the object.
Does anybody knows where to find the c++ code for free() in the Engine? This way, we would be sure.
The pointer isn't cleared, there's no code doing that in the engine, the description in the documentation is wrong
Simply: The free method is called on an instance, and that method can't change the data stored in the Variant that holds the pointer, and the existence of the get_validated_object exists is evidence of this, it checks the pointer against the ObjectID that it also stores and this allows avoiding accessing freed instances
Your Godot version:
Godot 4
Issue description:
In the
Nodes and scene instances
tutorial, the following line:Should say "invalid" instead of "null". Saying that a reference becomes null means that it contains the
null
value, which is not what happens.URL to the documentation page:
https://docs.godotengine.org/en/stable/tutorials/scripting/nodes_and_scene_instances.html#creating-nodes
The text was updated successfully, but these errors were encountered: