We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Godot version: Godot 3.0 RC1
Issue description:
Memery leak with cyclic preload in GDScript.
Steps to reproduce:
Create a script a.gd with content as below
a.gd
extends SceneTree const b = preload("b.gd") func _init(): quit()
Create another script b.gd with content as below
b.gd
const a = preload("a.gd")
Run the script a.gd with godot
godot -s a.gd
The program complains about memery leaks
ERROR: ~List: Condition ' _first != __null ' is true. At: core/self_list.h:100. ERROR: ~List: Condition ' _first != __null ' is true. At: core/self_list.h:100. WARNING: cleanup: ObjectDB Instances still exist! At: core/object.cpp:1989. ERROR: clear: Resources Still in use at Exit! At: core/resource.cpp:418.
The text was updated successfully, but these errors were encountered:
This is not a bug, this is a feature. It's in the GDScript documentation. Any cycles are leaked.
Sorry, something went wrong.
So how to use this feature in right way? I can't write as weakref(preload('b.gd')
What?Is it a feature?How to use it.
@Geequlim you cant, simply dont do cycles. Just dont use preload, use load() normally and then you can weakref.
No branches or pull requests
Godot version: Godot 3.0 RC1
Issue description:
Memery leak with cyclic preload in GDScript.
Steps to reproduce:
Create a script
a.gd
with content as belowCreate another script
b.gd
with content as belowRun the script
a.gd
with godotThe program complains about memery leaks
The text was updated successfully, but these errors were encountered: