I am using one ArrayList called "releAttr" in my program. Since I'd like to use it for several times for different groups of objects, I need one clean way to 'recycle' it, i.e. getting the container totally empty again.
I tried the removeRange(int fromIndex, int toIndex) method, but it was a protected one. And now the only choice I am left with is to run a loop with method remove(int index). I was also wondering if I could go straight and declare "releAttr=null", but I guess in that way I wouldn't be able to release all the memory correctly(or could I?).