I have two ContentManagers, one that contains assets that are always in memory, and another that unloads between levels. Whenever I call Unload I see a small amount of memory unload, but no where near the amount that it should be. (For example: I load in ~600mb of content but only 100 is leaving memory) So because of this my game crashes because there’s no more memory on the Xbox One for the next level. I’ve also tried calling Dispose on the ContentManager, and manually calling GC.Collect but the results are the same.
When my game boots, I’ve tested loading both level one and two, and they both load fine individually… so I know the issue isn’t that one of the levels has too much content. The out of memory exception only happens when I load level one, unload and then try to load the next level.
This issue only seems to occur on UWP… this code works correctly on MonoGame.PS4 and XNA4. I’ve read other topics where people have had this issue but so far I haven’t found a solution. Are we supposed to call Dispose on every single object individually? I was under the impression we only need to call Unload on the ContentManager that loads in the content.
Would really appreciate some help!