Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2128

Finalizer in XRTreeFrag (xalan.jar) causes lots of loitered objects (memory leak).

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6
    • 2.7
    • Xalan
    • None
    • fp1

    Description

      Finalizer in XRTreeFrag (xalan.jar) causes lots of loitered objects. Since there is a clean up method destruct() available and all the clients should call this clean up method rather rely on finalizer.
      Because of finalizer in this class these objects gets put on finalizer queue and dont get cleaned when they go out of scope. Finalizer is provided probably as a safty net here but this is hurting swearly.

      The fix should be simple remove finalizer from this class. I have tested it and it did clean up the resources and fix the memory leak.

      The attached snapshots should help to explain this fact (both leaked Objects and after the fix no memory leak because of XRTreeFrag).

      Attachments

        1. XRTreeFrag_RetainedObjects.jpg
          287 kB
          Faizan Ahmed
        2. XRTreeFrag_GCRoots_2.jpg
          268 kB
          Faizan Ahmed
        3. XRTreeFrag_GCRoots_1.jpg
          268 kB
          Faizan Ahmed

        Activity

          People

            Unassigned Unassigned
            faizan Faizan Ahmed
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: