View Full Version : [FNR] Memory leak when closing a window

6 May 2009, 3:40 PM
I have discovered a memory leak when closing a window. My profiler shows that the eventPreview is the cause.

Adding to the close method:

if (eventPreview != null) {

similar to what is in the hide method fixes the problem.

7 May 2009, 6:53 AM
Fixed in SVN.

7 May 2009, 3:33 PM

Also if I hide() a window then close() it, it does not get unregistered from the WindowManager as close immediately exits if the window is hidden and therefore leaks.

Showing a hidden window then closing it is a work around.

In general should hidden windows be eligible for garbage collection from the GXT point of view?

7 May 2009, 3:42 PM
If you want to hide it, than you want to hide it and reuse it.

If you dont want the window anymore, than you have to close it.

7 May 2009, 3:50 PM
OK, so closing a hidden window causes a leak too.

7 May 2009, 3:53 PM
That is not the common way to go. We will look into it.