IsInstanceValid
called before the end of the frame returns true on an object that called QueueFree
#99239
Open
Description
opened on Nov 14, 2024
Tested versions
tested on v4.3.stable.mono.official
System information
Windows 10 - Godot v4.3.stable.mono.official
Issue description
If we call node.QueueFree()
, IsInstanceValid(node)
should return false
even before the end of the frame.
I can't think of a reason why would anyone need to have IsInstanceValid(node)
returning true after a node.QueueFree()
call.
Steps to reproduce
- Create a node,
- Print out
IsInstanceValid
- QueueFree the node
- Print out
IsInstanceValid
It prints out
true
true
and I think it must print out
true
false
Minimal reproduction project (MRP)
ColorRect n = new ColorRect();
AddChild(n);
GD.Print(IsInstanceValid(n));
n.QueueFree();
GD.Print(IsInstanceValid(n));
Activity