I have a collection List and i need to reverse order of it.
Everything works fine with
List<Point> myList = new ArrayList<Point>();
i can reverse it with
Collections.reverse(myList);
but this causes to allocate java.util.AbstractList$FullListIterator
i have about 5000 - 10000 paths to reverse in pathfinder and this causes GC to kick in.
How can i reverse this without any neccessary allocation ? I'm using generic pools whenever i can but i'm stuck with this.