I am pretty new to Unreal development.
I am trying to fix some memory allocation issues that I have.
I am streaming jpegs to a texture at ~5FPS on an Android app. (the texture updates at 5FPS)
To unpack the texture jpeg, I am using this code:
const TArray<uint8>* UncompressedBGRA = NULL;
if (!ImageWrapper->GetRaw(ERGBFormat::BGRA, 8, UncompressedBGRA))
However, as far as I can tell this allocates a new bit buffer every time.
And my app eventually grinds to a halt and crashes.
This is "partially fixed" if I call:
GetWorld()->ForceGarbageCollection(true);
"Partially fixed": Meaning the app doesn't crash anymore, but the app still stutters.
Is there some way to get Unreal to unpack a jpeg in place?
Or do I need to compile some other C++ jpeg decoder?