modio / modio-ue4-legacy

Unreal Engine 4 Plugin for integrating mod.io - a modding API for game developers
https://mod.io
MIT License
85 stars 14 forks source link

Fixing potential GC issue when using CallbackProxies #7

Closed MarkusRannare closed 5 years ago

MarkusRannare commented 5 years ago

All UObject pointers needs to be marked UPROPERTY for the Garbage Collector to be aware of them. So if the WorldContextObject would be GC:ed during the callback, this would lead to a dangling pointer. It's no problem if the pointer isn't used between the static construction and the activate function where the world context object is used. But it's good riddance to not have dangling pointers if you would start to use the world context object in the response