Packaged game will not run when static TSharedRef defined

Hi,

I noticed that when I have a static member TSharedRef FInternetAddr defined, the packaged game will not run. It does not even have an error message. However it is able to compile and run in the editor.

In .h file
UCLASS()
class INTERPROCESSCOMMS_API UConnectionModule : public UBlueprintFunctionLibrary
{
GENERATED_BODY()

public:
static FSocket* ConnectionSocket;
static bool ConnectionSocketIsConnected;
static TSharedRef test;

in .cpp file

TSharedRef test = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateInternetAddr();