godot/modules/gdscript
Pedro J. Estébanez 46bfe4452f 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:54:15 +02:00
..
doc_classes [Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
editor Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
icons Fix missing module editor icons 2020-03-08 19:32:25 +02:00
language_server Replace more occurrences of NULL with nullptr 2020-04-02 14:56:01 +02:00
config.py DocData: Skip unexposed classes 2020-04-20 12:51:10 +02:00
gdscript.cpp Fix object leaks caused by unfulfilled yields 2020-05-05 17:54:15 +02:00
gdscript.h Fix object leaks caused by unfulfilled yields 2020-05-05 17:54:15 +02:00
gdscript_compiler.cpp Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
gdscript_compiler.h Style: Set clang-format Standard to Cpp11 2020-03-17 07:36:24 +01:00
gdscript_editor.cpp Merge pull request #37172 from theoway/autoCompletionBug 2020-04-24 17:27:04 +02:00
gdscript_function.cpp Fix object leaks caused by unfulfilled yields 2020-05-05 17:54:15 +02:00
gdscript_function.h Fix object leaks caused by unfulfilled yields 2020-05-05 17:54:15 +02:00
gdscript_functions.cpp Make dict2inst to work with arbitrary _init parameters 2020-04-30 18:30:04 +03:00
gdscript_functions.h Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
gdscript_parser.cpp Mention offending function name in "Indented block expected" error 2020-05-02 17:10:34 -07:00
gdscript_parser.h export var type reduce() implemented 2020-04-27 19:26:57 +05:30
gdscript_tokenizer.cpp Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
gdscript_tokenizer.h Implement decals 2020-04-14 11:13:34 -03:00
register_types.cpp Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
register_types.h Adding missing include guards to header files identified by LGTM. 2020-03-23 04:52:36 -04:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00