[
http://jira.codehaus.org/browse/JANINO-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96410 ]
Adam Heath commented on JANINO-88:
----------------------------------
When would the JSCL be GCed, exactly? It won't, until the classes that were loaded by it were *all* GCed. All classes loaded by the VM maintain a reference back to their loading ClassLoader. If a class happened to be added into a ThreadLocal, and the ThreadLocal is maintained statically in a class not dynamically loaded, then everything underneath JSCL will never be freed.
I found this issue, while tracking down several memory leaks in a long-running server process. Made use of jconsole and jhat in java 1.6.
> JavaSourceClassLoader has a memory leak for JavaSourceIClassLoader.
> -------------------------------------------------------------------
>
> Key: JANINO-88
> URL:
http://jira.codehaus.org/browse/JANINO-88> Project: Janino
> Issue Type: Bug
> Reporter: Adam Heath
> Assignee: Arno Unkrig
> Attachments: fix_JavaSourceClassLoader-memleak.patch
>
>
> JavaSourceClassLoader creates a singleton JavaSourceIClassLoader in it's constructor. This is actually a cause for a memory leak in long-running server processes. The simplest fix is to create a new JavaSourceIClassLoader each time in generateByteCodes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email