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

Lazy loaded report details are never released

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 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

            mixalturek Michal Turek created issue -
            mixalturek Michal Turek made changes -
            Field Original Value New Value
            Assignee npiguet [ npiguet ] Michal Turek [ mixalturek ]
            mixalturek Michal Turek made changes -
            Link This issue is related to JENKINS-4769 [ JENKINS-4769 ]
            mixalturek Michal Turek made changes -
            Link This issue is related to JENKINS-17363 [ JENKINS-17363 ]
            mixalturek Michal Turek made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            mixalturek Michal Turek made changes -
            Issue Type Improvement [ 4 ] Bug [ 1 ]
            mixalturek Michal Turek made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            mixalturek Michal Turek made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 153922 ] JNJira + In-Review [ 207440 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: