Is there a good approach to recycling thousands of small structs, a subset of which get modified per frame.
Take something where i am creating a dynamic mesh on the fly. Some of the vertices and some of the tris get modified but I'd like to be able cache what I have.
conventionally, I might create an array of these objects and cycle through the array as a primitive factory. Is there any way to encapsulate this in say a generic class or anything?
I realize that structs are copied by value.
I'm just not sure what the best performance solution is to this.