Skip to content

Fix dangling script fix

Created by: RandomShaper

  • First commit reverts the former approach (from #23094), to start clean.
  • Second commit implements the new, simpler yet better approach.

My first attempt was silly in that it created circular references between the scripts and their functions.

This time I'm keeping functions pointing to the script non-owningly, only adding a reference to the script for call state objects.

Checks for script being alive on resume is therefore not needed anymore.

Fixes #23661 (closed). Partially fixes #23827 (closed) (only the GDScript-related leaks).

Merge request reports