I'm having a huge problem with memory accumulation in all my games. This happened after switching from monogame 3.4 to 3.5 so I switched back. Then recently I went to 3.6(latest release) and started having the same problem again. I would switch back again but I need 3.6 rather than 3.4 for certain reasons.
I've tried both .Dispose() and .Unload() for the content but it seems to only release a small portion of what was previously loaded.
Here is the code
public void UnloadContent()
{
if (overworldContent != null)
{
overworldContent.Unload();
}
}
I've also done
public void UnloadContent()
{
if (overworldContent != null)
{
overworldContent.Dispose();
}
}
This is a picture of the memory usage from just going in and out of an area just a few times over the course of several minutes. A player could easily have multiple gigabytes taken up from playing for even just one hour if it goes from 86MB to 235MB in just 2 minutes
I seriously need help.
GC.Collect ()
after you unload/dispose to see if the memory clears. if not, then the objects likely still have references somewhere. \$\endgroup\$