Strange Memory Leak in Unity Editor
I've been building a project for months with no great issues. I now cannot run or even open certain scenes, and the unity editor has a memory leak so that even when the editor isn't actually doing anything (i.e. the game isn't actually running), the memory usage goes up and up until bang, it resets the computer.
I've managed to disable as many assets as I possibly can, so it is down to a skeleton code, to try and identify the problem. But some scenes won't even load now so I can't even do this.
For those I can open, I disable as many game objects as possible, run the game, and in task manager the memory usage jumps. Then, when stopping the game, the memory usage does NOT come down again, so that the next time I run it, it just spikes up again, and again, and again.
The screenshots illustrate the problem - each time the scene is run, the memory spikes. Thats as expected. But the memory never returns back to its previous consumption afterwards. Surely this is a memory leak?
Here are some solutions I've tried, none have solved the problem
The memory leak goes on constantly when I have the main camera enabled. I thought this must be the root cause, so here are the various fixes I've tried:-
1) Disabled realtime / Mixed Lighting (as shown in screenshot)
2) Tried in different versions of Unity (5.6.1, 5.6.0)
3) Deleted / Reinstalled Unity
4) Deleted / Reinstalled all assets / libraries
5) Checked its not the 'preview window' issue
6) Written my own Editor Window to run 'EditorUtility.UnloadUnusedAssetsImmediate();' (has no impact)
I found this link, but I'm not sure it describes exactly the same problem:-
Any help greatly appreciated. If its just a bug thats going to be fixed I'll keep myself busy with something else until its released!
Your answer
Follow this Question
Related Questions
UnityEngine.UI.Image keeps removing itself from a Prefab. 1 Answer
Error when trying to upload a package to the unity asset store (file not found, loader.html) 2 Answers
Unity Editor crashes when pressing play (2017.2.0f3 64bit) 2 Answers
My map turns blue red and green always! 0 Answers
Help! When i add my main menu to the build settings, and build the game, it crashes 0 Answers