ICEpdf
  1. ICEpdf
  2. PDF-590

Memory leak in the Viewer RI

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0, 5.0.1
    • Fix Version/s: 5.0.2
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      Core seems to be ok, Viewer RI only.

      Description

      A forum user first commented on memory exceptions with the viewer RI and I as able to the verify the problem with a heap of 64m and a large file. I'll put in more detail below but there are few spots where we where not unregistered , keyboard, focus and mouse events.

        Activity

        Hide
        Patrick Corless added a comment -

        The main cause of the memory leak was related to the CurrentPageChanger's addMouseListenerToAnyButtonsIn() method call. I can't find any documentation on this method but the listener call as adding mouse listeners to any sub components of the vertical and horizontal scroll bar.

        I all reintroduced the dispose() call for annotation components so that annotation component could unregister any listeners.

        These two issue plus a couple other minor issue was causing the soft and week references from not be garbage collected. This issue was limited to the viewer RI and core appears to be unaffected by this issue.

        Show
        Patrick Corless added a comment - The main cause of the memory leak was related to the CurrentPageChanger's addMouseListenerToAnyButtonsIn() method call. I can't find any documentation on this method but the listener call as adding mouse listeners to any sub components of the vertical and horizontal scroll bar. I all reintroduced the dispose() call for annotation components so that annotation component could unregister any listeners. These two issue plus a couple other minor issue was causing the soft and week references from not be garbage collected. This issue was limited to the viewer RI and core appears to be unaffected by this issue.
        Hide
        Patrick Corless added a comment -

        Closing issue. The Viewer RI can now open and close large documents with a limited heap size without any heap issues. The profiler results also look promising with only one instance of a Document kept around between file opens.

        Show
        Patrick Corless added a comment - Closing issue. The Viewer RI can now open and close large documents with a limited heap size without any heap issues. The profiler results also look promising with only one instance of a Document kept around between file opens.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: