[
https://issues.apache.org/jira/browse/MYFACES-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235122#comment-13235122
]
Ruben Martin Pozo commented on MYFACES-3510:
--------------------------------------------
This is a fragment of the WeakHashMap documentation
"Implementation note: The value objects in a WeakHashMap are held by ordinary
strong references. Thus care should be taken to ensure that value objects do
not strongly refer to their own keys, either directly or indirectly, since that
will prevent the keys from being discarded. Note that a value object may refer
indirectly to its key via the WeakHashMap itself; that is, a value object may
strongly refer to some other key object whose associated value object, in turn,
strongly refers to the key of the first value object. One way to deal with this
is to wrap values themselves within WeakReferences before inserting, as in:
m.put(key, new WeakReference(value)), and then unwrapping upon each get."
> 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