niklas2902 / py4godot

Python scripting for Godot. This GDExtension plugin allows you to use Python like GDScript, accessing the Godot engine's features and benefiting from Python's vast ecosystem.
MIT License
64 stars 7 forks source link

Improve memory issues #40

Closed niklas2902 closed 3 months ago

niklas2902 commented 3 months ago

There are instances where a Godot Object could be deleted by adding it to an array / dictionary wihtout having any other References or calling call_deferred with it as an argument. This should be fixed. Maybe by introducing a proxy method for call_deferred and changing list handling for Array and Dictionary

niklas2902 commented 3 months ago

I think, this is unnecessary. Doing something with proxy methods is not 100% save. I don't see there any fix which could be done in reasonable time and in GDScript, you also have to call free or queue_free to free the node and memory. So I think, I should just delete the destructor