I use Memory Profiler to analyze the memory use of spine animation, firstly I load the spine animation UI, and then unload spine animation UI. I found the Managed Heap still has lots of memory in use. I see there is a lot of memory called Empty Fragment Heap Space, I think it is generated by spine data. Does it belong to in use Managed Heap, why it belongs to in use Managed Heap.
Yes, all managed heap breakdown categories except for Virtual Machine belong to Managed Heap Memory in Use, also known as the “GC Used Memory” Profiler Counter or as Profiler.GetMonoUsedSizeLong. It counts as in use because it can’t be unloaded due to fragmentation. It counts as empty, because it can be reused for new allocations that fit into the empty spaces.
Check out the fragmentation page and look for bright blue (managed objects) and medium dark blue (empty fragmented heap space). You might have to adjust the row size to see the fragmentation, and in diff view, the colors are focused on the change, so switch to single mode.