commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Voorbraak (JIRA)" <>
Subject [jira] Commented: (LANG-436) Remove caching from MethodUtils
Date Fri, 13 Jun 2008 09:52:45 GMT


Erik Voorbraak commented on LANG-436:

So you removed caching for Should the same
not also happen for org.apache.commons.beanutils/ This is where I discovered
a memory leak today.

As far as I can see, it uses a WeakHashMap, whose keys are weak references. However, the map
is filled with MethodDescriptor instances, which are created in the same method as where they
are put as keys in the map. So one would expect that the get garbage collected on the first
occasion. It looks like the cache should have been one where the values are weak. Why we still
had the memory leak, I cannot explain.

> Remove caching from MethodUtils
> -------------------------------
>                 Key: LANG-436
>                 URL:
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Niall Pemberton
>            Assignee: Niall Pemberton
>             Fix For: 3.0
>         Attachments: LANG-436-remove-MethodUtils-caching.patch
> I think we should remove the caching from MethodUtils. This has caused memory leak problems
in BeanUtils (where it was copied from) and better IMO to just provide the pure reflection
API in lang and let downstream users provide solutions for improving performance.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message