Hello, we’re facing issues with Webgl memory handling, so i did few tests
- First test was to create a 20 mgb byte array and then set it to null and do a GC.Collect but when doing profiling in chrome Inspector the memory kept increasing until it reached out of memory exception and crashed, did some research it mentioned that on webgl unity doesnt unload memory using GC.Collect
- Downloaded a texture and did a profile and it showed an increase in memory, then did an unload and did a profile the memory stayed the same it didnt decrease, but when i loaded the texture again it didnt increase
- Downloaded 200 mgb of asset bundle content ( Meshes and Prefabs ), did a profile, then unloaded, the memory stayed the same, but after that i downloaded textures and did a profile and the memory increased, it reached about the combined sum of the bundle content and the textures. But after that if i load or unload it doesnt change for both cases
- While researching it said that unity cleans memory when unloading a scene so i setup a scene and added it additively, memory increased, then unloaded the scene and memory stayed the same
Is there a way to better profile webgl to get more accurate data because it seems that inspector profiling isnt showing accurate results, or webgl doesnt free memory when it gets reserved and it only can overwrite it with the same type of content?