Bug 49900 - BundleSupport.release() does not call super.release() to clear bodyContent
Summary: BundleSupport.release() does not call super.release() to clear bodyContent
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.1
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 12:32 UTC by Jim Frederic
Modified: 2010-10-10 13:15 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.