[concurrency-interest] Re: PooledLinkedBlockingQueue

Gregg Wonderly gregg.wonderly@pobox.com
Mon, 01 Nov 2004 16:32:08 -0600

Larry Riedel wrote:
> I would expect there to typically be
> a factory for pooled objects, and I think it should be
> just fine to depend on the garbage collector to let the
> pool manager know when a pooled object is no longer
> reachable, rather than the pool manager requiring its
> users to keep track of that; indeed I do not think the
> pool manager should necessarily even require its end
> users to be aware that the objects are pooled at all.

If the GC has to tell the factory that it's done with the object, why 
would that be 'better' than for the application to tell the factory it 
is done, explicitly.  The extra code in the application would seem to be 

Maybe you have some examples that would make it more obvious to me where 
this would be better done by a GC->Object relationship?