|Topic was automatically imported from the old Question2Answer platform.
I wonder is there is a simple way to call a function just before a node gets freed.
Either some “OnFree()” to override (in C# if possible), or a signal to connect?
I am asking this because I have some container nodes “owning” other nodes which are not added to the main tree. (Typically patches of the world far from the player, which are only partially loaded and are not in the tree for performances reasons)
Having on “OnFree” method would thus allow to QueueFree also those unregisted nodes at the right time.
I think that if I do not it is a memory leak ?