avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: [RT] pooling vs. release
Date Fri, 02 Aug 2002 00:50:15 GMT
On Fri, 2 Aug 2002 00:54, Leo Sutic wrote:
> > From: Torsten Curdt [mailto:tcurdt@dff.st]
> >
> > ...I just came across an idea. I remembered the discussion
> > about the removal
> > of the "lookup/release" pattern in favor of a simple "lookup".
> >
> > Would it possible to utilize the "finalize" method for pooled
> > components?
>
> I think we killed that suggestion. The motivation was that GC
> was too unpredictable, too slow, and the tuning had too coarse
> granularity.

And plain wont work unless we use wrappers for all our resources. The reason 
being that any one object will only have finalize() called twice through its 
entire life. So if the first finalize you push resource back into pool, its 
death put off. If it happens a second time, finalize is not guarenteed to be 
called again. At least that was my impression from a read ages ago though it 
does sound very wrong.

-- 
Cheers,

Peter Donald
-----------------------------------------------------
When a stupid man is doing something he's ashamed of, 
he always declares that it is his duty.
					George Bernard Shaw 
-----------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message