Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-148

Huge memory leak resulting from the use of ThreadLocal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.0
    • 1.0
    • core / taglib.core
    • None

    Description

      There is a huge memory leak that results from the TagScript's use of ThreadLocal.

      ThreadLocal is usually used from a staic variable, while TagScript uses it from an instance variable. Although this looks legal to me, it causes a huge memory leak.

      Attachments

        1. jelly-nothreadlocal.ZIP
          13 kB
          Guido Anzuoni
        2. jelly-nothreadlocal2.ZIP
          6 kB
          Guido Anzuoni
        3. memory-leak-junit-test.txt
          7 kB
          Hans Gilde
        4. TagScript.java
          22 kB
          Paul Libbrecht
        5. thread-local-memory-leak.zip
          2 kB
          Hans Gilde
        6. thread-local-memory-leak-fix-demo.txt
          3 kB
          Hans Gilde
        7. thread-local-memory-leak-fix-demo-parent.txt
          19 kB
          Hans Gilde
        8. thread-local-memory-leak-fix-final.txt
          10 kB
          Hans Gilde
        9. thread-local-memory-leak-fix-final-1.txt
          15 kB
          Hans Gilde
        10. thread-local-memory-leak-fix-final-xml-tags.txt
          3 kB
          Hans Gilde
        11. thread-local-memory-leak-profile.zip
          2 kB
          Hans Gilde

        Activity

          People

            Unassigned Unassigned
            hgilde Hans Gilde
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: