classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] StringBuilder and Appendable for CVS HEAD


From: Tom Tromey
Subject: Re: [cp-patches] StringBuilder and Appendable for CVS HEAD
Date: 16 Dec 2004 10:36:30 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Jeroen" == Jeroen Frijters <address@hidden> writes:

Jeroen> In the String(StringBuilder) constructor:
Jeroen> +            buffer.shared = true;
Jeroen> +            value = buffer.value;

I thought the synchronized block in this method would force a commit
of "shared".  I'm not an expert on the memory model though.

Anyway, I'd prefer we find a way to make it possible not to reallocate
the characters when constructing the String.  It seems to me that
sharing is optimizing for the common case.  Probably, most uses of
StringBuilder will be to implement "String +".

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]