2 Replies Latest reply on Apr 12, 2010 6:08 AM by Ondrej Medek

    EnumType causes memoty leaks?

    Ondrej Medek Apprentice


      redeploying of my application in JBoss AS 5.1.0GA (exploded deployment) causes memory leaks. I have tried Eclipse MAT for the analysis of the problem and I suspect iy is caused by EnumType http://opensource.atlassian.com/projects/hibernate/browse/HHH-4317


      May it be the cause of memory leak? If so, may you (gently -)) push the Hibernate guys to solve it? I see this code is there for a long time.





      P.S. my problem is that I use ZKoss framework, which has some memore leaks, too. That's why I am just 95% sure EnumType causes memory leaks. Maybe I will try to make a simple testcase for this issue.

        • 1. Re: EnumType causes memoty leaks?
          Scott Marlow Master

          Hi Andy,


          It might be helpful if you went into more detail about what you see in the memory analyzer tool (with regard to the leaked storage).  For example, something like:


          Class org.acme.catch.Hungry contains a hashMap.  The HashMap has 10,000 instances of the same object value (each one referenced by a numerically incremented key).  The map contains:

            ( ("1", "Liz"), ("2", "Liz"), ..., ("10000","Liz") )


          Of course, you shouldn't include any private data.    For the same reason, you shouldn't post the heap dump here either.


          As far as putting gentle pressure on the Hibernate guys to solve this.  That is best done by getting a support subscription (JBoss app server should be good).  Check out http://www.jboss.com/services/subscriptions/ and help us to help you.



          • 2. Re: EnumType causes memory leaks?
            Ondrej Medek Apprentice

            Hi Scott,


            hmmm, money, you've got a point I will support you by providing a test case and patch (already attached to the HHH-4317 bug).