groovy

memory leak in WeakDoubleKeyHashmap

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.5.7
  • Fix Version/s: 1.5.8
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

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.

Activity

Hide
blackdrag blackdrag added a comment -

fixed

Show
blackdrag blackdrag added a comment - fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: