You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Todd Volkert (JIRA)" <ji...@apache.org> on 2009/10/06 14:07:31 UTC

[jira] Updated: (PIVOT-297) Window.open(owner) is prone to memory leak

     [ https://issues.apache.org/jira/browse/PIVOT-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Volkert updated PIVOT-297:
-------------------------------

    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.

  was:
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 remove the open() signature that takes an owner and leave it up to callers to call setOwner(), then open().


> Window.open(owner) is prone to memory leak
> ------------------------------------------
>
>                 Key: PIVOT-297
>                 URL: https://issues.apache.org/jira/browse/PIVOT-297
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 1.3
>            Reporter: Todd Volkert
>            Assignee: Greg Brown
>            Priority: Critical
>             Fix For: 1.4
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.