Skip to content

GDScript: Destruct remaining instances when language is finished#118191

Open
HolonProduction wants to merge 1 commit into
godotengine:masterfrom
HolonProduction:gdscript/goodbye-instance
Open

GDScript: Destruct remaining instances when language is finished#118191
HolonProduction wants to merge 1 commit into
godotengine:masterfrom
HolonProduction:gdscript/goodbye-instance

Conversation

@HolonProduction
Copy link
Copy Markdown
Member

Fixes: #106401

When GDScriptLanguage is destructed we now detach GDScripts from all remaining instances. This prevents crashes when other systems that get destructed later still hold references to those instances.

@HolonProduction HolonProduction force-pushed the gdscript/goodbye-instance branch from 13bdc44 to 3e14ac0 Compare April 29, 2026 13:51
@Ivorforce Ivorforce requested a review from a team April 29, 2026 14:45
Copy link
Copy Markdown
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, matches my understanding of what destruction should guarantee.
It might be interesting to add logging if we find any that haven’t been destroyed at this time, since it might indicate a bug elsewhere.

Haven't tested; don't know the GDScriptLanguage code, but the fix looks simple and correct to me.

Not sure whether this is a good pick for 4.7. It might fix issues, but it might introduce others. So it's at least somewhat risky in my mind.

@Repiteo Repiteo modified the milestones: 4.x, 4.8 May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signal 11 Crash When Closing Godot with @tool InputMap

3 participants