Polling server via http, seemingly random errors after around 60 seconds

UObjects (and any derived from them like AActors), will always be tied to garbage collection as that is how their memory allocation is designed to work. If you create any UObject and there isn’t a path from “root” to your object by following UObject pointers/references then your object will most certainly be garbage collected at a time slice specified in the ini file (usually 30 seconds, but maybe Rocket has changed that). There are other ways to control the lifetime of a UObject, but most are probably beyond the scope of what you are trying to do.

Rama is correct that adding UPROPERTY will work. UPROPERTY would in fact be required in most cases unless you were handling the lifetime yourself (again not usually necessary). UPROPERTY does much more than aid in GC. It provides reflection metadata to the engine about your class (or variable or function via UFUNCTION). This reflection data is also required for replication (non UFUNCTIONs can’t be RPCs, non UPROPERTYs won’t replicate for example).

RF_RootSet is part of a function AddToRoot, which is one of the more advanced ways to control GC, but not recommended.

Detecting garbage collection in the future can be done by overloading BeginDestroy() on your AActor derived class. It should be called when GC has determined it’s about to be killed. At that time IsPendingKill() should start to report true. During your ticks you may want to guard with that because the object is about to get destroyed and any work it’s doing is probably no long required, assuming its lifetime is working correctly.

Hope this insight helps.