How to garbage collect USTRUCTs?

Hi fed0r,

You’re right that everything derived from UObject is managed by GC, everything else is not. Time a struct stays alive really depends on the owner of the struct. usually structs (not pointers to structs) are just memebers of the owning class in which case they will stay alive as long as the owner stays alive. I’d say the best way to make sure something like this is alive is to keep a local copy of the struct.

1 Like