You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2013/10/16 01:06:42 UTC
[jira] [Commented] (MYFACES-3795) ErrorPageWriter cause memory leak
in visitedFacetCount map
[ https://issues.apache.org/jira/browse/MYFACES-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13795780#comment-13795780 ]
Leonardo Uribe commented on MYFACES-3795:
-----------------------------------------
It seems the bug was introduced in MYFACES-2777. It is clear that map should be in FacesContext attribute map. I'll fix that.
> 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:
> Parrent componet should be removed from visitedFacetCount when it back from recursion.
--
This message was sent by Atlassian JIRA
(v6.1#6144)