About TSharedRef in lecture "Finding Online Sessions"

In this lecture, we had to create a TSharedRef for FindSessions() function. Sam did that by first creating a TSharedPtr and converting it to TSharedRef. My question is why can’t we just create TSharedRef using TSharedRef<FMyObjectType> NewReference = MakeShared<FMyObjectType>(); ,instead of converting from TSharedPtr to TSharedRef ?

P.S: I tried that but it gave me errors that I didn’t quite understand.

@DanM?
Also please feel free to bump a topic after 48 hrs.

@sampattuzzi (at the moment) for Unreal MP.

1 Like

What was the actual code you tried?

1 Like

Privacy & Terms