Don't delete mesh

Hi. I had a little problem. When I calling DestroyActor () (also I tried Destroy and Destroycomponent()), it doesnt delete WeaponMesh. BlueprintClass inherited by AMyWeapon, difference just because in BlueprintClass chosen WeaponMesh. Do you know how I can solve this problem?

(In the second screenshot Create CurrentWeapon)

What is WeaponMesh1P? I can only see the beginning of the type - is it a USkeletalMeshCompnent or a USkeletalMesh?

WeaponMesh1P is it USkeletalMeshComponemt, which was created in c++, and mesh was loaded in BlueprintClass.

Let’s see the code that created WeaponMesh1P.

WeaponMesh1P = PCIP.CreateDefaultSubobject(this, TEXT(“WeaponMesh1P”));

I think the proper answer is that you shouldn’t have to totally destroy it. DestroyActor has already marked the SkeletalMeshComponent for destruction and it will be cleaned up totally the next time the Garbage Collector runs.

Here’s a good discussion about what happens when you Destroy an actor: