March 2019
Intermediate to advanced
708 pages
17h 9m
English
The following code demonstrates the de-allocation of an instance of the UObject class:
UObject *o = NewObject< UObject >( ... ); o->ConditionalBeginDestroy();
This concept also works with any class derived from the UObject class. So, for instance, if we wanted to do this with the UAction object we created in the previous recipe, we would add the bold text in the following snippet:
// Create an objectUAction * action = NewObject<UAction>(GetTransientPackage(), UAction::StaticClass() /* RF_* flags */ ); // Destroy an objectaction->ConditionalBeginDestroy();
Read now
Unlock full access