Originally Posted by SDPhantom
Honestly, it's a judgement call on how many UI objects you're comfortable creating and the ratio of used and unused objects. There will always be overhead when recycling resources. It's a balance between how frequent you're going to be reallocating such resources and how much would otherwise go to waste. This code can still be optimized to be lighter on both memory and CPU.
|
Yes, but not just reusing the object costs resources, but recycling them. Maybe at the end of the day, it's better just to create a new object. Of course the resource usage is spread out more with the first method, but it you create so many things at the same time for this to worth doing it, you already doing something wrong.