If I need to remove a UStaticMesh from my component, do I NEED to mark it for destruction? Or can I just remove it from my component and leave it for the garbage collector to deal with?
For instance should I do (A):
if(MyStaticMesh->IsValidLowLevel())
{
MyStaticMesh->ConditionalBeginDestroy();
MyComponent->SetStaticMesh(0);
}
Or should I just do (B):
MyComponent->SetStaticMesh(0);
I ask because A seams to crash super frequently, as well as giving me “Failed to Load Asset” errors.
B SEEMS to remove the static mesh as I’d like it to? But I haven’t found concrete information telling me it’s not still floating around un-cleaned-up.