-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
None
-
1.2fcs
-
generic
-
generic
-
Not verified
Currently, Window.dispose removes the Window from its parent's ownedWindowList
Vector. This is incorrect from a specification standpoint. Recall that dispose()
does not make a java.awt.Window unusable; rather, it destroys the peer and any
other native screen resources allocated for the Window. The Window can be reused
by directly or indirectly invoking addNotify on it a second time.
In addition to the specification issue, invalidating the ownedWindowList can
lead to crashes on both platforms. If an owned Window considers another Window
its parent, but the parent does not contain the owned Window in its
ownedWindowList Vector, then when the parent Window is disposed(), its peer
is removed, but the peer of the owned Window is not. The native owned Window now
refers to another native Widget which no longer exists. When the owned Window
tries to access this Widget, the VM can crash.
Vector. This is incorrect from a specification standpoint. Recall that dispose()
does not make a java.awt.Window unusable; rather, it destroys the peer and any
other native screen resources allocated for the Window. The Window can be reused
by directly or indirectly invoking addNotify on it a second time.
In addition to the specification issue, invalidating the ownedWindowList can
lead to crashes on both platforms. If an owned Window considers another Window
its parent, but the parent does not contain the owned Window in its
ownedWindowList Vector, then when the parent Window is disposed(), its peer
is removed, but the peer of the owned Window is not. The native owned Window now
refers to another native Widget which no longer exists. When the owned Window
tries to access this Widget, the VM can crash.
- relates to
-
JDK-6877809 Memory leak in JDialog
-
- Closed
-