Hello!
Earlier I wrote a short script that just instantiates and disposes of a system in a loop for X times.
At the end of all loops GC.Collect() And Resources.UnloadUnusedAssets() are called.
The problem is really big TMPro allocations in managed memory. Specifically, some really big Dictionaries and collections.
At the end of the run, only 1 copy of each Unity Object exists in memory, and all managed memory I used inside the system itself is cleared.
From the profiler, each iteration in the loop also clearly unloads all addressable assets (as the system's Dispose() should).
I'm wondering if anyone here could point me in the right direction in how to not cause or at least mitigate this.
Thanks in advance!