RE: JavaMemoryModel: A different slant with reference leakage

From: David Holmes (dholmes@dltech.com.au)
Date: Sun Jan 18 2004 - 19:31:46 EST


Sylvia,

> Note that there is nothing fancy about this code. The
> potential leak does not arise from causality violations.
> Yet it feel that this example is much
> more typical of a real life scenario.

I don't quite understand the point you are trying to make here. The
first version of the code has a property that only holds if the
non-threadsafe code is not used in a non-threadsafe manner.
Intuitively the lack of synchronization allows a thread to potentially
see any value that had been stored as the delegate - including the
internally defined one.

David Holmes

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



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