WebGL not releasing memory,WebGL not Releasing the memory
Problem Statement: WebGL not releasing memory, thus causing Out of Memory issue: Description: We are working on a webGL project which has many CAD models imported in the scene through the PIXYZ plugin, when making a build and running it on chrome browser the build is working well, and on checking on chrome memory profiler’s heap snapshot, it’s memory occupancy is around 2300-2400MB, Now we have a feature in the project where we need to merge some meshes which increase the build size at runtime, but even after when we destroy those merged meshes the memory size is not releasing, which can be seen in again taking a heap snapshot in chrome memory profiler.
When I check it in unity3d profiler, the garbage collection happening properly. But it’s not happening in web browser or with webGL build, the build memory occupancy just keeps increasing even If I delete all the gameobject from the scene at runtime.
So, since it’s not releasing the memory and if we merge new mesh it is increasing the build size, the build get crashed. Whereas this behavior cannot be seen in the unity profiler.
Your answer
![](https://koobas.hobune.stream/wayback/20220613035454im_/https://answers.unity.com/themes/thub/images/avi.jpg)