oniksan/godobuf

Generated classes should extend Reference

wooky opened this issue · 4 comments

wooky commented

Currently, the generated classes extend Object, so when they're no longer used, they need to be deallocated manually or else they will leak (see here). I propose that they should extend Reference so when they're no longer used, they get deallocated automatically.

Ok. I'll see when I have free time.
I'll write here if I do something or do not do.

For anyone seeing this now and concerned about manually freeing their message objects, in Godot 3.5 the default inheritance (which all the generated classes fall back to) is Reference. ( https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#memory-management )
In my testing, this seems to also be the case in 3.4.4-stable, but I can't find documentation to back this behaviour up and haven't tested any earlier Godot versions against this.

@wooky, where did you see that generated classes extend Object?

I close this issue, because it's not relevant.