You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Tomasz Szlek (JIRA)" <de...@myfaces.apache.org> on 2013/10/02 16:46:42 UTC
[jira] [Created] (MYFACES-3795) ErrorPageWriter cause memory leak
in visitedFacetCount map
Tomasz Szlek created MYFACES-3795:
-------------------------------------
Summary: ErrorPageWriter cause memory leak in visitedFacetCount map
Key: MYFACES-3795
URL: https://issues.apache.org/jira/browse/MYFACES-3795
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.1.11
Environment: Linux
Reporter: Tomasz Szlek
We have noticed that there is a memory leak in class org.apache.myfaces.renderkit.ErrorPageWriter, map: visitedFacetCount.
This memory leak occurs when <ui:debug/> is used.
Description of problem:
Ui debug component tree page use visitedFacetCount as a temporary source of UI components in order to generate html page based on such components.
This generator use visitor : ExtendedComponentTreeVisitCallback class.
Inside method visit we have following lines :
972: _incrementVisitedFacetCount(parent); //put compnent into visitedFacetCount map
...
1131: _removeVisitedFacetCount(parent); // remove visited component from visitedFacetCount map.
Unfortunatelly visited component is removed from visitedFacetCount map only if there are no children for component.
Thus it looks like components are never removed properly from visitedFacetCount.
Possible solution:
Parent componet should be removed from visitedFacetCount when it back from recursion.
--
This message was sent by Atlassian JIRA
(v6.1#6144)