However, I doubt this is really By Design, even though the older issue was closed with this resolution.
We are getting references (like 1000+ references) to every terrain Mesh, even thought the objects that allegedly reference it are GUI objects etc.; you can find the one real reference (MeshCollider) between the references as well, but the rest are nonsense and should not be referencing the Mesh.
I have uploaded a snapshot from a real project where you can check these wrong references with the bug report; you can find it as Case 1115073.
Yeah, I guess either of those is a fair game; having at least an understanding why it acts that way would be nice, but proper fix would be better (unless Unity really references native object between each other in the most befuddling ways).
Well, it seems they just auto closed the issue and I missed the email, because I did not provide a repro, just the snapshot. I will try to get it reopened, because this issue is really really annoying.
It unfortunately it doesn’t seem to sound like the problem I’ve seen, where a Mesh has references to an AudioSource for example. Or could it be same as well?
It could be. The current snapshot code collects references by going through everything that has pointers to each other. So if your Audio Source is on a GameObject with a Mesh on it, the Audio Source has a reference to the Gameobject, which has a reference to the Mesh. References here meaning both managed or native access to each other.
Technically, that’s true, but it’s definitely not the reason why they are all in memory. So we need to address that in how we collect the connections. That’s something that needs changes in the back-end (for collecting) and front-end (for crawling and displaying it correctly) of the memory profiler.
I hope it’s the same issue. With this issue getting fixed, it could also boost profiler performance! If there is no need to transfer and evaluate [509.117.918 connections]( ░ ▒ ▓ █ Heap Explorer - Memory Profiler, Debugger and Analyzer for Unity page-2#post-3619123), but only a fraction, that could be a huge performance and memory win.