gcj internals documentation

Tom Tromey tromey@redhat.com
Fri Oct 6 03:04:00 GMT 2006


>>>>> "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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /