The insomnia got me today...  Couldn't sleep! :-)
https://issues.apache.org/jira/browse/BEANUTILS-291

There is a proposed fix on the JIRA.. it works!

Nice.. isn't?


The idea is to use a WeakHashMap<ClassLoader, FastHashMap> on the Property also. I don't think this would cause performance issues, since WeakhashMap would have just few lines, and it would be released fairly quickly. Someone could create a ConcurrentWeakHashMap for that though... (I have created one for JBossSerialization already.. but there is not secret on that)

Whoever apply the fix, please run the testcase without the fix, and then with the fix.


The memory leak testcase needs to be expanded though... I don't know for instance if DynaBeans would cause a leak or not, since they are not being used on this test.

And this gets a nice idea about how you would fix any similar bugs.


Any chance this will be applied before 1.8 final?


Clebert


Clebert Suconic wrote:
 > should the second sample on the wiki page not contain
 > SoftReference reference = new SoftReference(x); instead of
 > WeakReference reference = new WeakReference(x); ?

Yep! :-) Just fixed it.

Thanks!

Clebert



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to