>>>>> "Ian" == Ian Rogers <[EMAIL PROTECTED]> writes:

Ian> +  private static char[] cloneCharArray(char[] src)
Ian> +  {
Ian> +    char[] copy = new char[src.length];
Ian> +    VMSystem.arraycopy(src, 0, copy, 0, src.length);
Ian> +    return copy;  
Ian> +  }

I think it would be better in these places to copy the "live" subset
of the char[] -- if 'this' String is a slice of some other array, we
don't want to copy the entire array, but instead only the part that we
use.  This will use less memory.

Unfortunately this change would mean updating the logic of the
surrounding functions, since they generally use offsets into the
original array.

Tom

Reply via email to