How to properly work with UObjects in background threads (GC)

This short article addresses the question of how to work with UObjects in a thread-safe way when passing them to some workers, asynchronous tasks, thread pools, or whatever else using a non-game thread. One of the most important issues here is garbage collection. When we pass a UObject* that is not set to root directly to a background thread, it is possible that the passed UObject may be silently deleted by the garbage collector....

November 30, 2022 · 1 min · Georgy Treshchev