[concurrency-interest] [Javamemorymodel-discussion] Fences.keepAlive

Gregg Wonderly gergg at cox.net
Wed Jan 21 14:19:22 EST 2009


Hans Boehm wrote:
> 
> 
> On Wed, 21 Jan 2009, Gregg Wonderly wrote:
> 
>> Maybe I'm still not getting what the underlying issue is.  I thought 
>> we were
>> talking about the fact that because there were no other visible 
>> references that
>> the Compiler/GC might decide on actions that would cause the object to 
>> be made
>> eligible for GC.  So, to me releaseHere(), or doneUsingReference() or
>> holdThisUntilHere() or some such is the control that we are trying to 
>> put in
>> place.  Am I still missing something?
>>
> The problem is that the reference may or may not be used again later in
> another method call.  If it is used again later, we expect keepAlive()
> (or whatever) to be a no-op, since the object can't be finalized yet
> anyway.  But releaseHere() implies that we are definitely done with the
> reference, and it's OK to garbage collect the object.

Implicitly, I was meaning, "I'm finally done using the object here, so release 
it from being referenced".

Gregg Wonderly


More information about the Concurrency-interest mailing list