commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: [BeanUtils] Memory Issues
Date Fri, 07 Oct 2005 11:37:39 GMT
I might suggest using System.identityHashCode() rather than the hashCode()
of the classloader itself just in case a ClassLoader implementation doesn't
"play nice" with respect to its implementation of hashCode().  We did
something similar in HiveMind.

-----Original Message-----
From: Niall Pemberton [] 
Sent: Friday, October 07, 2005 1:17 AM
To: Commons Developers Jakarta
Subject: [BeanUtils] Memory Issues

There are a couple of issues regarding memory leaks in BeanUtils for
"caches" that are keyed by java.lang.Class. I have limited
memory/ClassLoader knowledge and I was hoping someone would comment on a
suggestion I posted to resolve this.

Rather than using the Class as the key for these caches how about generating
a key using the Class's name and the ClassLoader's hashcode. Is this a
good/bad idea?

  String classKey = beanClass.getName() +

I posted a patch for WrapDynaClass to the bug:

There is also the same issue for PropertyUtilsBean


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message