C#C
C#9mo ago
AllMight

Maybe the case for object pooling?

I have a large array I am processing. Each item is a large object that has multiple processors (classes with state).
Creating those 10 for example proccessors for every item in the list will be expensive.
Should I use something like object pooling? So I create the processor once and reuse it using a reset pattern? What's the best way to handle it?
Also maybe there is a better alternative to classes altogethe?
Was this page helpful?