controlp5 icon indicating copy to clipboard operation
controlp5 copied to clipboard

Change Vector to ArrayList

Open GoToLoop opened this issue 9 years ago • 0 comments

Since ArrayList isn't safe like Vector, I'm also adding synchronized () at places where either of its structure's size() changes. Those 6 methods are: add(), addDrawable(), remove(), removeDrawable(), clear() and clearDrawable(). Of course, all loops traversing this class still needs to be synchronized externally as well; either over get() or getDrawables(). Last word: This patch is just a standalone performant refactoring. It's not obligatory for ControllerGroup's previous patch.

GoToLoop avatar Jul 09 '16 09:07 GoToLoop