godot/modules/gdscript
Pedro J. Estébanez 64344e6d1d Fix object leaks caused by unfulfilled yields
Now the stack saved in a `GDScriptFunctionState` is cleared as soon as the `yield()` operation is known not to be resumed because either the script, the instance or both are deleted.

This clears problems like leaked objects by eliminating cases of circular references between `GDScriptFunctionState`s preventing them and the objects they refer to in their saved stacks from being released. As an example, this makes using `SceneTreeTimer` safer.

Furthermore, with this change it's now possible to print early warnings about `yield()`s to released script/instances, as now we know they won't be successfully resumed as the condition for that happens. However, this PR doesn't add such messages, to keep the observed behavior the same for the time being.

Also, now a backup of the function name in `GDScriptFunctionState` is used, since the script may not be valid by the time the function name is needed for the resume-after-yield error messages.
2020-05-05 17:53:47 +02:00
..
doc_classes DocData: Skip unexposed classes 2020-04-21 14:15:34 +02:00
editor Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
icons Add support for creating editor icons per module 2019-06-28 23:42:26 +03:00
language_server fix: Return only scenes for script owners on LSP completion 2020-03-25 09:44:09 +01:00
config.py DocData: Skip unexposed classes 2020-04-21 14:15:34 +02:00
gdscript.cpp Fix object leaks caused by unfulfilled yields 2020-05-05 17:53:47 +02:00
gdscript.h Fix object leaks caused by unfulfilled yields 2020-05-05 17:53:47 +02:00
gdscript_compiler.cpp Keep a weak reference to orphan subclasses to reuse on class reload 2020-01-15 22:54:01 +02:00
gdscript_compiler.h GDScript: Don't re-evaluate index on assigment with operation 2020-01-09 10:43:29 -03:00
gdscript_editor.cpp Fixed the bool _static logic 2020-04-27 10:09:49 +02:00
gdscript_function.cpp Fix object leaks caused by unfulfilled yields 2020-05-05 17:53:47 +02:00
gdscript_function.h Fix object leaks caused by unfulfilled yields 2020-05-05 17:53:47 +02:00
gdscript_functions.cpp GDScript: enable type checks on release mode 2020-01-08 12:38:18 -03:00
gdscript_functions.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
gdscript_parser.cpp Fix for marking assert lines as safe bug 2020-05-01 10:56:58 +02:00
gdscript_parser.h export var type reduce() implemented 2020-05-01 10:56:58 +02:00
gdscript_tokenizer.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
gdscript_tokenizer.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
register_types.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
register_types.h Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
SCsub GDScript: Disable LSP if either jsonrpc or websocket are disabled 2019-08-28 13:29:37 +02:00