Why should I replace raw pointers with TObjectPtr?

No. While I still don’t think Epic’s made it clear why one should use TObjectPtr instead of raw pointers, the one thing I think is clear from them is that it’s only useful for members. There’s no real reason to use them in function signatures or as local function variables.

An Epic docs page

Or Tom Looman is pretty good too (you’ll have to scroll down just a little though).

10 Likes