Is the root component NULL by default?

In this lecture, we reassigned the RootComponent pointer to our new UCapsuleComponent object, but we didn’t call a destructor or free any memory on the initial RootComponent. Does that mean it’s NULL by default, or is there some C++ magic going on behind the scenes to handle destruction and memory deallocation?

Yes.

Also all UObject’s are garbage collected using Unreal’s custom system

Unreal Object Handling in Unreal Engine | Unreal Engine 5.3 Documentation

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms