Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3147

memory leak in WeakDoubleKeyHashmap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.5.7
    • 1.5.8
    • None
    • None

    Description

      when executing a script like

      1000000.times {
        def shell = new GroovyShell()
        def object = shell.evaluate("new Object()")
      }
      

      then a profiler will show, that the WeakDoubleKeyHashmap inner class instances for for example Entry do increase all the time. The reason behind this is, that the map does not call expungeStallEntries() if not either the method size() or remove are called. The additional amount of memory per iteration is quite small, but over time it will cause a problem.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            blackdrag Jochen Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: