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

Lazy loaded report details are never released

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: