Sorry to necropost, but is this still true? The Garbage Collection documentation says:
One practical implication here is that you typically need to maintain a
UPROPERTY
reference to any Object you wish to keep alive, or store a pointer to it in aTArray
or other Unreal Engine container class.
This doesn’t explicitly say a TArray
member itself needs to be a UPROPERTY
. The or store a pointer to in in a TArray part implies that simply storing it in any old TArray
(marked UPROPERTY
or not) is sufficient to prevent elements from being GC’d. That said, there appears to be nothing inside the TArray
itself that knows about GC, so it appears that the UPROPERTY
reflection macro is still required.