Comment

Comment by b33j0r

Yes, or they are free’d automatically as the parent is free’d recursively. If you have called `add_child` on a node you created dynamically, godot will handle its lifecycle from there.

If you don’t add a dynamically-created node to the tree, you are responsible for `free`.

That almost never comes up, because I eventually figure out how to decompose everything into a tree Node, or! A Resource.

Resources are managed in a separate memory pool, and don’t need to be added to the tree for godot to take care of it. Go ahead, you just try and `free` a resource! ;)

parent b33j0r 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton