Skip to content

IsInstanceValid called before the end of the frame returns true on an object that called QueueFree #99239

Open
@IurieYSI

Description

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

  1. Create a node,
  2. Print out IsInstanceValid
  3. QueueFree the node
  4. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions