[richfaces-issues] [JBoss JIRA] Updated: (RF-8134) Memory leak in the in-process template compiler.

Jay Balunas (JIRA) jira-events at lists.jboss.org
Mon Nov 23 16:10:30 EST 2009


     [ https://jira.jboss.org/jira/browse/RF-8134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Balunas updated RF-8134:
----------------------------

    Comment: was deleted


> Memory leak in the in-process template compiler.
> ------------------------------------------------
>
>                 Key: RF-8134
>                 URL: https://jira.jboss.org/jira/browse/RF-8134
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: performance
>    Affects Versions: 3.3.2.SR1
>            Reporter: Alexander Smirnov
>            Assignee: Alexander Smirnov
>            Priority: Critical
>             Fix For: 3.3.3.BETA1, ENT_3.3.1.SP1
>
>
> In-proces compiled templates are widely used by dynamic stylesheets or complonents like suggestionBox. These templates are compiled into in-memory object structures what usually have only one instance in application. These objects are called with special context to generate request output ( lightweight object pattern ).
> <f:call element > caches call parameter values in its instance, even FacesContext or current component references that are short-time objects. As a results, memory leaks are occured in the org.ajax4jsf.rendercit.compiler.MethodCallElement class. The source of problem are inner Signature1 and Signature2 classes:
> Signature1(int size) {
>                 arguments = new Object[size + 1];
>         }
>         void update(TemplateContext context, Object[] parameters) {
>                 arguments[0] = context;
>                 System.arraycopy(parameters, 0, arguments, 1, parameters.length);
>         }
> }
> class Signature2 extends Signature {
>         Signature2(int size) {
>                 arguments = new Object[size + 2];
>         }
>         void update(TemplateContext context, Object[] parameters) {
>                 arguments[0] = context.getFacesContext();
>                 arguments[1] = context.getComponent();
>                 System.arraycopy(parameters, 0, arguments, 2, parameters.length);
>         }
> To avoid memory leaks, only types of the target method should be cached ( not object instances ).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list