分爲兩類
1.被UPROPERTY標記的USTRUCT或者被UPROPERTY標記的TArray可以被垃圾回收的
2.函數內自己動態new的USTRUCT需要你自己管理釋放,UE4不會幫你釋放。或者使用智能指針。
參考資料:
1.https://www.ue4community.wiki/Legacy/Structs,_USTRUCTS(),_They%27re_Awesome#Garbage_Collection
2.https://gameinstitute.qq.com/community/detail/101085
3.https://docs.unrealengine.com/zh-CN/Programming/UnrealArchitecture/Reference/Structs/index.html