All Instanced components outside of c++ constructor of an Actor are reset to null when compile a blueprint that inherit the c++ Actor

Here is the function in the .cpp

void ABuildingGenerator::AddNewSpline()
{
const FString nameGenerator = “Generator”;
auto newSpline = NewObject(this, FName(FString::Printf(TEXT(“%s_%d”), *nameGenerator,
SplineComponents.Num())),
RF_Public | RF_Transactional | RF_DefaultSubObject);
newSpline->CreationMethod = EComponentCreationMethod::Instance;
//register des components
newSpline->RegisterComponent();
newSpline->AttachToComponent(GetRootComponent(), FAttachmentTransformRules::KeepRelativeTransform);
SplineComponents.Add(newSpline);

}