Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21921

Lazy loaded report details are never released

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • sloccount-plugin
    • None
    • Version 1.15, introduced in 1.11

      SloccountResult.lazyLoad() caches the data to a member variable. The class is loaded during Jenkins startup (all build.xml files) and never released so Java garbage collector has no chance to trash the lazy loaded details since the reference exists forever. This is kind of a memory leak.

      Consider to make "private SloccountReport report" member transient and to use readResolve() from Java Serialization to transform legacy data instead of calling convertLegacyData() in getStatistics().

      Found during a work on Cppcheck's JENKINS-17363.

            mixalturek Michal Turek
            mixalturek Michal Turek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: