View Full Version : Doubt on Window in large desktop application

13 Nov 2009, 12:12 PM
Hi all,
I'm developing a desktop application and so I have many window to manage. My doubt is if it's better calling hide() or destroy them. I'm worried that hiding them I'll have memory or performance problems, considering that many users will connect and that most of the windows are filled by RPC call. Which is your advise?

Thanks in advance.

13 Nov 2009, 12:13 PM
Hide frees up all memory if you dont keep a reference to it. GXT does not have something like destroy. It uses the detach/attach model from GWT.

13 Nov 2009, 3:27 PM
Thanks for your answer, I would understand more about what you said:
1) You said that hide free all memory, but how can I delete references?
2) I have used removeWindow + put to null the objects, isn't it right?
3) Can you explain me how to use detach/attach?
4) In an application with hundreds of users connected, what is the best way to manage windows?

Thanks you very much....

27 Sep 2010, 12:51 AM

Same scenario.
I'm implementing a web desktop app based on GXT widgets, and need to manage many windows.

1. How to correctly remove references?: hide() + null?

2. I have a scenario wherein I have a window with a grid.
And for CRUD, this grid brings up a dialog with another grid with many rows!!
How do I correctly "dereference" the dialog when the window ("parent") has been closed?

I'm doing something like:

this.window.addListener(Events.Detach, new Listener<BoxComponentEvent>() {
public void handleEvent(BoxComponentEvent be) {
//added to avoid memory leaks..we need to delete the dialogs when the window
//has been detached!!
if (CRUDDialog != null) {
CRUDDialog .hide();
CRUDDialog = null;
if (moveDialog != null) {
moveDialog = null;

IS this correct?