Hello Isomorphic,
We have a window class that sets custom header controls, like follows.
The controls may or may not remain hidden until the window is destroyed.
I noticed in the Watch tab that after closing the window, those custom header controls appear parentless, undrawn, and do not seem to be destroyed.
I assumed the window would destroy them, however, I also tried adding the following, which no luck.
Thanks
Is there something I am missing that I should be doing to clear these header controls up?
SmartClient Version: v9.1p_2014-08-31/Pro Deployment (built 2014-08-31)
FF 24.8.0
We have a window class that sets custom header controls, like follows.
Code:
refreshHeaderCtrl = new HeaderControl(HeaderControl.REFRESH, new ClickHandler() { @Override public void onClick(ClickEvent event) { onRefreshClicked(); } }); closeHeaderCtrl = new HeaderControl(HeaderControl.CLOSE, new ClickHandler() { @Override public void onClick(ClickEvent event) { onCloseClicked(); } }); headerSpacer = new LayoutSpacer(); headerSpacer.setWidth(15); setHeaderControls(headerSpacer, HeaderControls.HEADER_LABEL, refreshHeaderCtrl, closeHeaderCtrl);
I noticed in the Watch tab that after closing the window, those custom header controls appear parentless, undrawn, and do not seem to be destroyed.
I assumed the window would destroy them, however, I also tried adding the following, which no luck.
Thanks
Code:
@Override public void destroy() { super.destroy(); if (refreshHeaderCtrl != null) { refreshHeaderCtrl.destroy(); refreshHeaderCtrl = null; } if (closeHeaderCtrl != null) { closeHeaderCtrl.destroy(); closeHeaderCtrl = null; } if (headerSpacer != null) { headerSpacer.destroy(); headerSpacer = null; } }
SmartClient Version: v9.1p_2014-08-31/Pro Deployment (built 2014-08-31)
FF 24.8.0
Comment