Remove any UObject?

As well as I can create any object with something like

UMaterial* UnrealMaterial = NewObject<UMaterial>(Package, *FixedMaterialName, RF_Public); 

Is there anyway to remove it?

I tried with

findMaterial = FindObject<UMaterial>(ANY_PACKAGE, mname);//works ok
if (findMaterial != NULL)

But without luck :frowning:

Thanks for your help!

You don’t need to do anything explicit to destroy the UObject. Once all pointers to it are nulled, the garbage collector will clean it up.