Bug 49900

Summary: BundleSupport.release() does not call super.release() to clear bodyContent
Product: Taglibs Reporter: Jim Frederic <jfrederic>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P2    
Version: 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Jim Frederic 2010-09-08 12:32:43 UTC
I'm running standard-1.1.2.jar in Tomcat 5.5.  Profiling reveals large memory usage in org.apache.jasper.runtime.BodyContentImpl objects.

I believe this is because org.apache.taglibs.standard.tag.common.fmt.BundleTagSupport does not call super.release() from it's release() method.  The superclass, BodyTagSupport, nulls the reference to bodyContent in it's release() method. 

The BundleTag instances are pooled by the container, so in between requests the most recent bodyContent cannot be garbage collected.  It will be reset on the next startTag() invocation, so the tag behavior is correct, but the memory usage is much higher than it should be.
Comment 1 Jeremy Boynes 2010-09-10 01:44:03 UTC
Sounds plausible. If you add the call to super.release() does the memory usage improve?
Comment 2 Jeremy Boynes 2010-10-10 13:15:00 UTC
Verified and fixed in trunk with r1006320.