/** * Trim the capacity of this <code>java.util.ArrayList<Object></code> instance to be the * list's current size. An application can use this operation to minimize * the storage of an <code>java.util.ArrayList<Object></code> instance. */ public override void trimToSize() { if (fast) { lock (this) { java.util.ArrayList <Object> temp = (java.util.ArrayList <Object>)list.clone(); temp.trimToSize(); list = temp; } } else { lock (list) { list.trimToSize(); } } }