Is Unreal's IsValid() meant to always be used instead of a c++ nullptr check, or is it optional based on the situation?

I am not sure if anyone is going to stumble across this, but I think IsValid() should be used on objects that have a UPROPERTY() over them and hence is being garbage collected, and you should be using nullptr checks if you are sure that the object that the pointer points to is not being garbage collected.

10 Likes