[UMG / UserWidget] What's the correct way to DESTROY a Widget?

It seems that calling RemoveFromParent on a Widget doesn’t actually destroy it. How can I actually mark a Widget to be destroyed? There doesn’t seem to be any easy way?

Calling ‘BeginDestroy()’ just crashes the game.

1 Like

Widgets are garbage collected when you stop referencing them. You don’t need to do anything special for them to be destroyed other than that. If you NEED to force it, you need to use the standard UObject approach which is to use MarkPendingKill() on the object and and on the next GC the object will be collected.

1 Like

Cool, thanks Nick :slight_smile: