Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make clear that free() doesn't set any references to it to null (in release builds) #4270

Closed
Demindiro opened this issue Oct 14, 2020 · 3 comments
Labels
archived area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement

Comments

@Demindiro
Copy link

Your Godot version:
3.2.2

Issue description:
While investigating a segmentation fault in a release build I realized one of the scripts was calling a method on an object that has been freed in the previous frame with queue_free. I assumed that all references to freed objects were automatically set to null since that is what seems to be happening in the editor (and debug builds).

That said, I'm not sure how is_instance_valid is supposed to work then (and it seems it indeed doesn't work at all). Is there something I'm misunderstanding?

URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-free

@Calinou Calinou added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Oct 14, 2020
@Calinou
Copy link
Member

Calinou commented Oct 14, 2020

See godotengine/godot#35534.

@Mickeon
Copy link
Contributor

Mickeon commented Oct 27, 2022

I don't recall this still being an issue, anymore. Should this be closed or kept for legacy reasons?

@Calinou
Copy link
Member

Calinou commented Oct 27, 2022

Closing in favor of godotengine/godot-proposals#1589. See the last comment in that proposal.

@Calinou Calinou closed this as completed Oct 27, 2022
@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement
Projects
None yet
3 participants