and similar which need to be garbage collected.
There are cases where it can’t be avoided but if you only need the return of something once, do not store it into a variable but use it directly, that will save you garbage collection and memory allocation, two of the more impacting things performance wise
I understand temporary allocation, GC, alloc, and compaction… but… what are the docs referring to around touches?
If I intrepret what is written in the docs, then the array allocates a temp variable on index request, and the GetTouch does not?
How is that possible?
And while there are performance implication for me by using one method over another, doesn’t Get use the touches array internally anyway??
Or does touches implement a custom list (array or variant) class that encapsulates the actual touches array, allocs a temp varialble on index request, while the Get method returns a reference to the actual array element object directly?