[ 
https://issues.apache.org/jira/browse/MYFACES-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235304#comment-13235304
 ] 

Leonardo Uribe commented on MYFACES-3510:
-----------------------------------------

What I mean with "weakly reachable" is since the map in propertyDescriptorCache 
is a WeakHashMap, once the keys are collected, the values are discarded and the 
Classloader can be discarded from memory too. So, "strictly speaking" there is 
no leak. What could happen is in one moment of the time the Classloader cannot 
be discarded since the weak keys needs to be discarded first.

Could you see if there is a leak over 
org.apache.myfaces.view.facelets.tag.MetaRulesetImpl (used in facelets)?, 
specifically with:

    private volatile static WeakHashMap<ClassLoader, Map<String, 
MetadataTarget>> metadata
            = new WeakHashMap<ClassLoader, Map<String, MetadataTarget>>();

This is a similar case. If this is not a problem, maybe the leak is caused by 
cache Method instances.
                
> Application components classloader memory leak
> ----------------------------------------------
>
>                 Key: MYFACES-3510
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3510
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.1.6
>         Environment: WIndows Glassfish Embedded
>            Reporter: Ruben Martin Pozo
>         Attachments: screenshot-1.jpg
>
>
> We've seen an application classloader memory leak due to the new class 
> javax.faces.component._PropertyDescriptorHolder class introduced in version 
> 2.1.6
> This class holds a reference to a Method of a component loaded by the 
> application classloader. The memory leak shows up when the 
> _PropertyDescriptorHolder is stored in the _ComponentAttributesMap class that 
> is loaded by the system class loader.
> You should use a WeakReference instead of storing the direct reference to the 
> Method

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to