Does mesh.triangles also return a copy of the triangle array?

So mesh.vertices returns a copy of the vertex array, so if you are accessing it more than a couple of times you should really store it in a local array to avoid excessive garbage being created. So if I have some code like this:

for(int i = 0; i < mesh.triangles.length; i+=3){
    Vector3 v0Vec = mesh.vertices[mesh.triangles*];*

Vector3 v1Vec = mesh.vertices[mesh.triangles[i + 1]];
Vector3 v2Vec = mesh.vertices[mesh.triangles[i + 2]];

}
Then I should really convert it to something like this:
Vector3[] verts = mesh.vertices;
for(int i = 0; i < mesh.triangles.length; i+=3){
Vector3 v0Vec = verts[mesh.triangles*];*
Vector3 v1Vec = verts[mesh.triangles[i + 1]];
Vector3 v2Vec = verts[mesh.triangles[i + 2]];

}
But does mesh.triangles do the same thing? Should my code really be more like this?:
Vector3[] verts = mesh.vertices;
int[] tris = mesh.triangles;
for(int i = 0; i < tris.length; i+=3){
Vector3 v0Vec = verts[tris*];*
Vector3 v1Vec = verts[tris[i + 1]];
Vector3 v2Vec = verts[tris[i + 2]];

}
Thanks for your help.

Yes, it does return a copy as well. Keep in mind that the Untiy engine core is written in native C++. All the built-in component data is stored on the native side. You can’t get direct access to native code memory within a managed environment without using unsafe code. Since Unity uses multiple threads in it’s core it can not ensure thread safety if they actually provide you direct access to internal memory structures.

If you need to do this more often you may want to use a cached List and use GetIncides instead. The same is true for GetVertices. If you just clear the lists and not recreating them all the time there will be no memory allocated for the subsequental calls.