DisplayTag

Memory leak when using external sorted and ordered list (paginatedList)

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1.1
  • Fix Version/s: 1.2
  • Component/s: Tag Library
  • Labels:
    None
  • Application server:
    Tomcat 5.5.26

Description

After sending in production the application was facing some serious memory problems (OutOFMemory). The problem was generated by the TableTag class which was

holding some references to the paginatedList. I've looked into the TableTag source code and saw that the cleanUp method was not cleaning the reference to

paginatedList while the release mothod does.

Solution was (as in http://jira.codehaus.org/browse/DISPL-400) to move the line :

this.paginatedList = null

from release() to cleanUp().

Please also note that (quote from http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/Tag.html#release()):

"
release

public void release()

Called on a Tag handler to release state. The page compiler guarantees that JSP page implementation objects will invoke this method on all tag handlers, but

there may be multiple invocations on doStartTag and doEndTag in between.
"

Activity

Hide
fabrizio giustina added a comment -
fixed in 1.2, thanks
Show
fabrizio giustina added a comment - fixed in 1.2, thanks

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: