[Memory leak] Ram usage of the editor going up and up .
Branch
release & staging
Describe the bug
After awhile while coding a decently sized game project and or editor project the editor ram usage will climb and not drop until it fills up ram or you restart the editor. It would appear that even not hot-reloading a lot the editor memory usage will slowly go up over time.
To Reproduce
- do dev things as per usual. etc.. hot reloading alot and whatnot.
- Observe your ram usage going up slowly.
Expected behavior
For the ram usage to not be so insane.
Media/Files
My ram usage after a dev session hot-reloading my shadergraphplus project .
Additional context
No response
I have also been getting this - I have to restart my editor after a while as it ends up using all of my ram.
Okay so I'm not crazy, there is definitely a memory leak somewhere else.
Hotload seem to not cleanup memory correctly
I left the editor open overnight a couple of times and came back to it using all my ram. Some of my other programs were crashing because there was no memory left to use. The editor wasn't playing or doing anything, it was just sitting at the default scene that I had been testing a tiny component on.
[EDIT] I dumped the memory and opened it in dotMemory. It was a 10GB dump but less than 1GB was being used by managed memory. I guess it's some unmanaged memory that isn't being released somehow.
While reading the code I noticed that Sandbox.Services.ServerList.Dispose uses Free when I think it should use FreeWeak, since the constructor uses AllocWeak. That's not the cause of this leak though.