From the Reference documentation:
References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with Object.free.
I tested creating 100000 ArrayMesh instances without doing anything with it or even creating references to it. I expected all the objects to be disposed of right away. When I looked in the Debugger Monitors tab, the objects were still there. when I looked at the memory used, it was still considerably higher than compared to running game without creating the 100000 instances. I thought maybe giving it time to get to dispose it would do the trick but that didn’t do anything even after at least 15 minutes.
How should I be disposing ArrayMesh instances to free resources?
Actual C# code used inside a _Ready() method:
for(int i = 0; i < 100000; i++)
new ArrayMesh();