Native Components Stay Forever

Hello,

I will first describe what I have done to cause this bug and then continue to describe what exactly is the bug.

  1. Create a C++ class inheriting from UActorComponent called UCallback with the class specifiers: BlueprintType, Blueprintable, EditInlineNew.
  2. Create a C++ class inheriting from UActorComponent called UInteractable
  3. Add a TArray as property to Interactable and add the specifiers: EditAnywhere, Instanced, Category
  4. Create a blueprint inheriting from UCallback, CustomCallback
  5. In the level editor, spawn an actor and attach a UInteractable component.
  6. In the array property add an element an as class select the blueprint. You will see that an actor component has been attached to the actor named CustomCallback_C_0; it is a native component.
  7. Remove all items from the array

When you are done, the component CustomCallback_C_0 is still attached although it was deleted and furthermore it cannot be remove from the actor as it is a native component; they will only appear once the editor has been restarted.

Cheers,
Univise

Hey Univise-

I was able to reproduce the behavior you mentioned and have entered a bug report (UE-30548) for investigation. As a workaround to deleting the actor I found that by closing/reopening the editor after saving, the removed element’s corresponding component will also be removed.

Cheers