Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-297

Window.open(owner) is prone to memory leak

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: wtk
    • Labels:
      None

      Description

      Window.open(owner:Window):void set up an implied association between the window's owner and the open state. It implies that the owner will be cleared when the window is closed, when that is not the case. Since ownership is a bi-directional association, failing to clear the owner of a discarded window will leak memory (the owner will maintain a reference to the owned [discarded] window).

      We should solidify the association between the window's owner and the open state – a window's owner will only be non-null if the window is open. WindowStateListener.windowClosed() should pass the owner to the listener, since by the time the listener gets the notification, the owner will have been cleared.

      Note that this change will constitute an API change to WindowStateListener, and possibly to some open() signatures.

        Attachments

          Activity

            People

            • Assignee:
              gbrown Gregory K. Brown
              Reporter:
              tvolkert Todd Volkert
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: