That’s a good article, thanks!
There are some types of objects that have a mechanism to register with their owners, and automatically create a hard reference to them. For example, actor components. Actors also have a similar mechanism - after spawning them, they will remain referenced by the level they are in.
In this case, I’m confused why an actor component would be garbage collected - it should be protected as it’s referenced by the actor (which isn’t marked for garbage collection, just the component).
There IS come caveats with ActorComponents though. The DestroyActor function will actually mark all components the Actor has as PendingKill. BUT components can be GC’d if they are not held by a strong pointer that is UPROPERTY as AActor does NOT hold components in a UPROPERTY container.
However this implies I need to register the ActorComponent.
I’ll try some things out and check out some examples of components, I could have missed something in SplineComponent or its visualizer which registers it.