I added some UE_LOG to the code and the array is filled in the task loop then when the task exits it reports zero items in the array and there is nothing in the main array in the actor but yet 600mb of ram is still in use
It seems that the reference is not correct inside the task and therefore does not change the array passed to it, just its own version of it some how.
The ram shoots up from a base line in the editor of 570mb in the editor with no actor to 2800mb with the tasks loop running. Then when the loop is done is goes down to 1400mb and sits there forever, even after the actor is deleted.
Yes, the running in tick function is for a building/updating facility that the actor will do.
I also added a HasAnyTags(RF_CreateDefaultObject) if statement check to disable the Tick if that is true.