2022-04-28 01:20 AM
If user wants to make object invisible, which method is the most efficient, e.g. in terms of performance or memory usage?
Generally, in which cases should use setVisible true/false vs. add/remove?
Is it so that the only difference is that remove/add modifies drawing order, but otherwise they are equal? (I.e. performance to draw removed or invisible objects are both neglible)
In that case add/remove should only be called in init (or if drawing order must be changed), and setVisible afterwards...
2022-04-30 11:49 PM
Hello, Tuoman.
> Is it so that the only difference is that remove/add modifies drawing order, but otherwise they are equal?
No. It differs in several points. I will write my understanding.
`setVisible()` is a function to show a instance based on `Drawable` class.
`remove()` is a function to delete a instance based on `Drawable` class for future rendering.
So I think as follows.