Search Issue Tracker
By Design
Votes
0
Found in
2018.1.0b7
Issue ID
1004043
Regression
No
[WebGL] Garbage collection doesn't work on scene change
How to reproduce:
1. Download attached project file
2. Change Platform to WebGL
3. Build "Scene 1" and "Scene 2"
4. Click "Load Scene 2" and notice the "Out of memory" error
Actual result: According to this blog post ( https://blogs.unity3d.com/2016/12/05/unity-webgl-memory-the-unity-heap/ ) the only time GC.Collect is performed in WebGL is on Scene Load, but in practice, it doesn't seem to be the case.
In the attached project I used an example "Prealloc" function from that post and from what I can see loading new scene doesn't seem to free the memory.
Reproduced with: 2017.3.1p3, 2018.1.0b8, 2018.2.0a1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Garbage collection works as expected, however, memory manager can not allocate a continuous block of memory in the same place, because some part of the freed continuous block is already in use. Not reproducible in 2018.2.0f2 and newer.