From: G (JIRA) <no...@at...> - 2006-06-23 13:33:33
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1236?page=comments#action_23382 ] G commented on HHH-1236: ------------------------ Because, to quote the Bug description at the top of the page: "To avoid memory leaks when web applications reload, please either remove reference to classloader in org.hibernate.util.DTDEntityResolver or remove static reference to that class in org.hibernate.util.XMLHelper " I however know enough about Java to know that using a static ClassLoader is a recipe for memory leaks. "ClassLoaders The use of the Java ClassLoader construct is riddled with chances for memory leaks. What makes ClassLoaders so difficult from a memory-leak perspective is the complicated nature of the construct. ClassLoaders are different in that they are not just involved with "normal" object references, but are also meta-object references such as fields, methods, and classes. This means that as long as there are references to fields, methods, classes, or objects of a ClassLoader, the ClassLoader will stay in the JVM. Since the ClassLoader itself can hold on to a lot of classes as well as all their static fields, quite a bit of memory can be leaked. " Please refer to this link for more information on the subject. http://dev2dev.bea.com/pub/a/2005/06/memory_leaks.html But if you have no intention of fixing this memory leak, can you, at least, remove it from the resolved issues. I think there are a few people under the mistaken impression that this has been resolved. > Remove static reference to classloader, to avoid memory leak at webapp reload > ----------------------------------------------------------------------------- > > Key: HHH-1236 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1236 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.0.5 > Environment: Resin 3.0.15, CGLib 2.1_3 > Reporter: Mattias Jiderhamn > Assignee: Steve Ebersole > Fix For: 3.2.0.alpha1, 3.1.3 > Attachments: OptimizeIt.jpg > > > To avoid memory leaks when web applications reload, please either remove reference to classloader in org.hibernate.util.DTDEntityResolver or remove static reference to that class in org.hibernate.util.XMLHelper > For background information, please see > http://forum.hibernate.org/viewtopic.php?p=2275217#2275217 > http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 > and attached screen shot -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |