I’m using UE4.7.6 and I’m getting a crash when constructing an object from a DLL.
Here is the code. So first this is called. This is the only actor in the scene and this is all it does so far.
// Called when the game starts or when spawned
void ATwitchActor::BeginPlay()
{
Super::BeginPlay();
TwitchAPI::GetInstance().RequestJSONValueAsync();
}
And in the RequestJSONValueAsync function it crashes here
// Retrieves a JSON value from an HTTP request.
pplx::task<void> RequestJSONValueAsync()
{
http_client client(L"https://api.twitch.tv/kraken/games/top");
http_client is from a 3rd party DLL called cpprest so I’m not too sure the details on how its creation works. The TwitchAPI class is not a UClass and does not inherit from any class.
Any ideas why the garbage collection would try to delete this?