I think TSharedPtr doesn’t play well with UObjects. I think FGCObjectScopeGuard is a better choice as stated in the accepted answer.
I think TSharedPtr doesn’t play well with UObjects. I think FGCObjectScopeGuard is a better choice as stated in the accepted answer.