From: Geoffrey T. <gta...@na...> - 2004-03-18 14:32:12
|
Pawel J Maczewski wrote: > On Wed, Mar 17, 2004 at 11:18:03AM -0500, Geoffrey Talvola wrote: >> >> The catch is that servlet instances are never deleted. Instead they >> are kept in a pool and reused for future requests. A servlet >> instance may be used in thread A and then _later_ used in thread B, >> but it will never be used in Threads A and B at the same time. >> > > Hi, > Now I have a question. If I would have 2 servlet instances, > created when 2 requests at the same time, and, as you say, the servlet > instances are never deleted, does it mean that theese 2 > insances would be in > the memory 4ever (until I restart the Webware)? Even if there > were no more > simultaneous requests? Is there some way to delete the > instance that haven't > been used for some time? Yes, the instances stay in memory forever, and no, I'm not aware of an easy way to delete them. But I wouldn't worry about it. The amount of memory taken up by a servlet instance is ordinarily very small. - Geoff |