On 1/26/06, James Carman <[EMAIL PROTECTED]> wrote: > I wonder why the StringUtils Class objects can't be garbage collected. > There should really only be one instance of the StringUtils Class object > after a webapp reload. The previous one should go away with the > WebappClassLoader when it is discarded. Correct? That would mean that we > have a memory leak somewhere.
I'm not sure commons-lang is to blame for this. The class itself looks quite normal (some simple static fields, nothing fancy). My major problem with it is that I don't need the values of these static fields and they take up a lot of memory. As to the redeploy problem, this is a known problem (not only in Tomcat) stemming esp. from the Singleton pattern and related static usages (see e.g. http://marc.theaimsgroup.com/?l=tomcat-user&m=113532811904238&w=2). This is why I asked whether it might be possible to introduce a StringUtilsBean (which would not need static fields anymore) because this would be easy to GC. Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
