Re: JavaMemoryModel: Serialization and final fields

From: Doug Lea (dl@altair.cs.oswego.edu)
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
deserialization.)

-- 
Doug Lea, Computer Science Department, SUNY Oswego, Oswego, NY 13126 USA
dl@cs.oswego.edu 315-341-2688 FAX:315-341-5424 http://gee.cs.oswego.edu/  
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



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