Hi, I have discovered a bug where if you remove an UPROPERTY TArray with content in C++ without manually clearing the content in editor will cause memory leak where the content of TArray will stay referenced by owner.
Steps to reproduce:
- Make a UPROPERTY(EditDefaultsOnly) TArray>
- Go into editor and fill up the array with actor BPs
- Go back to source code editor and remove the TArray
- Go back to owner of the removed TArray and use reference viewer
- Reference viewer will show the owner of the removed TArray referencing the content of the TArray even though the TArray is removed in C++. Hence, memory leak.
Expected outcome:
After the removal of the TArray, the owner of TArray should clear all the referencs to the content of TArray.