Why are Xstructors called multiple times in game startup and shutdown?

  • Engine 4.6
  • Executing Project with ‘-game -log’

My project contains a custom PlayerController class which subsequently allocates a custom ActorComponent for itself. During game startup the PlayerController class has its constructor called two times and the ActorComponent constructor is called three times! That doesn’t make sense to me.

During game shutdown the ActorComponent destructor is called three times as well. At least it’s symmetric there. I don’t know how many times the PlayerController class destructor is called during shutdown because I haven’t checked it yet, but I’m guessing it’s two to match the startup.

Is this actually expected behavior and if so why? This has ramifications regarding init and cleanup code in Xstructors if it’s intentional.