I've got a hibernate webapp which was leaking memory
when reloaded. After reading the lengthy discussion here:
I identifed two class fields in ReflectionUtils that
are definitely keeping WebappClassLoader from being
garbage collected on my system (vanilla versions of sun
jdk-1.4.2_08 on winxp, tomcat-5.0.28). After applying
the attached patch to cglib (switching from static
fields to static methods for the offenders), I can
reload my webapp without having to resort to the tricks
I note at the bottom of the hibernate thread.
The tests pass and cglib does not seem any slower. I
agree with Christian that these static fields oughtn't
inhibit garbage collection, but the fact of the matter
is that this patch definitely solves the problem for me.
Any chance of inclusion? More importantly, can y'all
explain why this patch works? :)