Hi, i have noticed that loading huge custom file that represent compressed texture using UnityWebRequest and creating texture in runtime with it’s byte data (using LoadRawTextureData) creates huge mono heap grow that cannot be released. here is the sample code:
using (var downloadRequest = UnityWebRequest.Get(mainUrl))
{
byte[] bytes= null;
yield return downloadRequest.SendWebRequest();
bytes= new byte[(int)downloadRequest.downloadedBytes - header];
Buffer.BlockCopy(downloadRequest.downloadHandler.data, header, bytes, 0, (int)downloadRequest.downloadedBytes - header);
texture.LoadRawTextureData(bytes);
texture.Apply(false, true);
texture.wrapMode = TextureWrapMode.Clamp;
}
any ideas?