mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-11 09:38:28 +08:00
Refs #1107 Fix memory leak in GWT code for dialog windows
This commit is contained in:
parent
f8e6c739ac
commit
db19248b2e
@ -436,12 +436,12 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
|
||||
}
|
||||
|
||||
// Close old windows which where not in UIDL anymore
|
||||
for (final Iterator<VWindow> rem = removedSubWindows.iterator(); rem
|
||||
.hasNext();) {
|
||||
final VWindow w = rem.next();
|
||||
for (final VWindow w : removedSubWindows) {
|
||||
client.unregisterPaintable(w);
|
||||
subWindows.remove(w);
|
||||
w.hide();
|
||||
// remove window from ordering for prevent memory leak
|
||||
VWindow.closeWindow(w);
|
||||
}
|
||||
|
||||
if (uidl.hasAttribute("focused")) {
|
||||
|
@ -1332,4 +1332,8 @@ public class VWindow extends VOverlay implements Container,
|
||||
contentPanel.focus();
|
||||
}
|
||||
|
||||
// Prevent memory leaks, remove windows from windowOrder
|
||||
public static void closeWindow(VWindow vWindow) {
|
||||
windowOrder.remove(vWindow);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user