Re: JavaMemoryModel: Serialization and final fields

From: Doug Lea (
Date: Mon Aug 30 1999 - 07:11:50 EDT

I said:

> I don't know what to think about clone() though.

This is not so bad after all. All the VM needs to do (on machines
requiring it) is to install a barrier before returning from clone for
any class that has a final field. The corresponding read-side barriers
will be there already for any class with finals, so you don't need a
global barrier. (This fact can sometimes also be exploited in

Doug Lea, Computer Science Department, SUNY Oswego, Oswego, NY 13126 USA 315-341-2688 FAX:315-341-5424  
JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:18 EDT