This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj internals documentation
>>>>> "Adam" == Adam Megacz <adam@megacz.com> writes:
Adam> Tom Tromey <tromey@redhat.com> writes:
>> The other is that StringBuilder, which is not synchronized, requires a
>> second allocation at toString time -- even if the StringBuilder does
>> not escape the thread and is dead after the call (since we don't
>> detect this).
Adam> Hrm, why doesn't StringBuilder have a "boolean shared" field like
Adam> StringBuffer does? I really like that trick ;)
StringBuilder is unsynchronized, and it can be used after toString is
called. So, there's no way to implement this.
Tom