O'Reilly logo
  • LI WEI thinks this is interesting:

you must use ConstructObject to create an instance of your object (not the C++ native keyword new), and call UObject::ConditionalBeginDestroy() to destroy the object (not the C++ native keyword delete).

From

Cover of Unreal Engine 4 Scripting with C++ Cookbook

Note

一旦使用UCLASS,你的object实例将只能通过ConstructObject创建,使用ConditionBeginDestroy来销毁