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
2020-02-19 09:15:16 -03:00
parent d490648168
commit 4d960efafc
4 changed files with 9 additions and 10 deletions

View File

@@ -73,7 +73,6 @@ class GDScript : public Script {
friend class GDScriptFunctions;
friend class GDScriptLanguage;
Variant _static_ref; //used for static call
Ref<GDScriptNativeClass> native;
Ref<GDScript> base;
GDScript *_base; //fast pointer access