What is the difference between TWeakPtr and TWeakObjectPtr?
TWeakObjectPtr is for weak pointers to UObjects, TWeakPtr for pointers to everything else.
Since UObjects are garbage collected and shared pointers are reference counted, we cannot have the same weak pointer type for all, unfortunately.
Thanks! Did you mean garbage collected?
Weak pointers do not affect garbage collection. If the pointed to object has been deleted, the weak pointer will be invalid. This is true for both UObjects and non-UObject (TSharedPtr) objects.
Sorry I made a typo myself (see my edit on my comment)… Thank you for the explanations.