GDScript: Remove self static reference and create one on calls

This is needed because of the new changes to Variant. The reference
counter is increased by adding it to a Variant, which means no GDScript
will be freed (or will be double freed if manually freed somewhere).
This commit is contained in:
George Marques committed 2020-02-19 09:15:16 -03:00
1 parent d490648168
commit 4d960efafc
4 files changed
+9 -10

No files matched your search

-1
View File
@@ -995,7 +995,6 @@ void GDScript::get_script_signal_list(List<MethodInfo> *r_signals) const {
GDScript::GDScript() :
script_list(this) {
_static_ref = this;
valid = false;
subclass_count = 0;
initializer = NULL;