You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Schreibman, David" <DS...@eTranslate.com> on 2001/10/04 20:28:36 UTC

[PATCH] SimplePool.java

Here's a simple tweak that clears out references to objects that are removed
from the pool.  The current code can delay garbage collection for objects
that are removed from the pool but not returned.

The diff is against 3.3-rc1

-David


RE: [PATCH] SimplePool.java

Posted by Marc Saegesser <ma...@apropos.com>.
I'll make the change to the tomcat_32 branch.


Marc Saegesser 

> -----Original Message-----
> From: Renato Weiner [mailto:reweiner@yahoo.com]
> Sent: Thursday, October 04, 2001 2:51 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: [PATCH] SimplePool.java
> 
> 
> What about Tomcat 3.2.3 ? There are the same lines of
> code...
> 
> 
> --- "Schreibman, David" <DS...@eTranslate.com>
> wrote:
> > Here's a simple tweak that clears out references to
> > objects that are removed
> > from the pool.  The current code can delay garbage
> > collection for objects
> > that are removed from the pool but not returned.
> > 
> > The diff is against 3.3-rc1
> > 
> > -David
> > 
> > > --- SimplePool.java.orig	Thu Oct  4 10:14:51 2001
> > +++ SimplePool.java	Thu Oct  4 10:54:08 2001
> > @@ -132,6 +132,7 @@
> >  	synchronized( lock ) {
> >  	    if( current >= 0 ) {
> >  		item = pool[current];
> > +		pool[current] = null;
> >  		current -= 1;
> >  	    }
> >  	    if( debug > 0 ) 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just 
> $8.95/month.
> http://geocities.yahoo.com/ps/info1

Re: [PATCH] SimplePool.java

Posted by Renato Weiner <re...@yahoo.com>.
What about Tomcat 3.2.3 ? There are the same lines of
code...


--- "Schreibman, David" <DS...@eTranslate.com>
wrote:
> Here's a simple tweak that clears out references to
> objects that are removed
> from the pool.  The current code can delay garbage
> collection for objects
> that are removed from the pool but not returned.
> 
> The diff is against 3.3-rc1
> 
> -David
> 
> > --- SimplePool.java.orig	Thu Oct  4 10:14:51 2001
> +++ SimplePool.java	Thu Oct  4 10:54:08 2001
> @@ -132,6 +132,7 @@
>  	synchronized( lock ) {
>  	    if( current >= 0 ) {
>  		item = pool[current];
> +		pool[current] = null;
>  		current -= 1;
>  	    }
>  	    if( debug > 0 ) 
> 


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1