I have a map of objects and want to use TUniquePtr class to make sure that when map will be destroyed objects will be destroyed as well. Adding new objects to map looks like:
class FCheckBoxHandler {...}
...
handlers.Add(UCheckBox::StaticClass(), TUniquePtr<FCheckBoxHandler>(new FCheckBoxHandler()));
It works as expected but I have a question about using operator new here. I know that Unreal Engine has custom memory management with garbage collection. Is operator new work correctly in this case (FCheckBoxHandler isn’t UClass/UStruct)?