NewObject destroyed when exiting Unreal Engine

Hi !

I’m currently working with TMap that contains a FString as key and my custom UObject class as value, and I fill it in C++ by creating new pointers ( using NewObject() ).

But when exiting the editor, pointers are destroyed and at launch TMap values are empty. (not TMap keys)

I tried adding parameters to NewObject : this as Outer parameter and MyClass::StaticClass as class param
eter.
But I get an issue when saving my scene (graph is linked to external private object)

Do you have any idea to tell the engine to store my pointers? I thought about the Register function but I don’t know which parameters to give.

Thank you in advance!

Guillaume

Found a solution : I needed to set Outer parameter with “this” instance, and next, to set the flag RF_Public to the created object.