Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 35534 invoked from network); 7 Oct 2005 11:38:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Oct 2005 11:38:07 -0000 Received: (qmail 93388 invoked by uid 500); 7 Oct 2005 11:38:04 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 93341 invoked by uid 500); 7 Oct 2005 11:38:03 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 93327 invoked by uid 99); 7 Oct 2005 11:38:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2005 04:38:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [216.68.127.190] (HELO carmanconsulting.com) (216.68.127.190) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2005 04:38:06 -0700 Received: from CARMANI9300 (carmanconsulting.com [127.0.0.1]) by carmanconsulting.com (8.13.4/8.13.4) with ESMTP id j97BbZxX015979 for ; Fri, 7 Oct 2005 07:37:40 -0400 From: "James Carman" To: "'Jakarta Commons Developers List'" Subject: RE: [BeanUtils] Memory Issues Date: Fri, 7 Oct 2005 07:37:39 -0400 Message-ID: <002401c5cb33$86cfc0a0$6401a8c0@CARMANI9300> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <021901c5cafe$5dfdb860$0200a8c0@DELL1800> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Thread-Index: AcXK/lSceiYliMt5Tc6WelwuDbt2uAANOmxQ X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 [mailto:niall.pemberton@blueyonder.co.uk] 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() + beanClass.getClassLoader().hashCode(); I posted a patch for WrapDynaClass to the bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=35263 There is also the same issue for PropertyUtilsBean Niall --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org