[ 
http://issues.apache.org/jira/browse/LANG-262?page=comments#action_12436013 ] 
            
Henri Yandell commented on LANG-262:
------------------------------------

Thanks Neil, I've applied that to the trunk (which is now for 2.3). It sounds 
like a completely plausible fix to me, though Stephen suggested on the mailing 
list that :

"I don't know whether a WeakHashMap works when the keys are Class objects
(as Class objects aren't exactly run-of the-mill). "

Which is also pretty believable.

Could you try out the nightly build from tonight? The 0920 build in:

http://people.apache.org/builds/jakarta-commons/nightly/commons-lang/

> Use of enum prevents a classloader from being garbage collected resuling in 
> out of memory exceptions.
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LANG-262
>                 URL: http://issues.apache.org/jira/browse/LANG-262
>             Project: Commons Lang
>          Issue Type: Bug
>         Environment: All
>            Reporter: Neil Redway
>            Priority: Critical
>             Fix For: 2.3
>
>
> When an enum is created it is placed in the static hashmap - cEnumClasses.  
> If the enum is created from a classloader which has a limited lifetime then 
> due to the strong reference the classloader is never garbage collected 
> resulting in a memory leak.  
> I believe that making the cEnumClasses a WeakHashMap should resolve the 
> problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to