controlp5
controlp5 copied to clipboard
Change Vector to ArrayList
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.