Why copy Utf8Consts?

Bryce McKinlay bryce@waitaki.otago.ac.nz
Sun Feb 17 00:36:00 GMT 2002


Why does _Jv_NewStringUtf8Const() copy the UTF8 data when initializing a 
String from a Utf8Const? Isn't a Utf8Const essentially a java string 
without the object/vtable header? So why not just create a 0-length 
string object and point the data field at the static Utf8Const data?

regards

Bryce.




More information about the Java mailing list