Do assets loaded via soft references get unloaded if the actor responsible for the loading is never destroyed?

If you have a UPROPERTY to a uobject (class, actor, component, widget etc etc) which is not soft, then you are keeping it from being garbage collected. In unreal hard pointers to UObject are automatically nulled when an object is destroyed. It should all be handled magically by the GC.

Memory Management & Garbage Collection in Unreal Engine 5 | Mikelis' Game Blog

Garbage Collection & Dynamic Memory Allocation - Old UE4 Wiki

All about Soft and Weak pointers | Tutorial

1 Like