View Single Post
03-27-16, 03:43 PM   #9
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by SDPhantom View Post
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.
  Reply With Quote