Hi,
Apparently I have managed to cause a “jqxWindow” related memory leak. I have written a function that dynamically creates a little modal popup jqxWindow (its a Yes/No confirmation dialog) and I try to destroy this dialog after use. After observing that my application leaks memory I found out that this dialog is the cause of the leakage. Each time I create the jqxWindow it appears to register a global “resize” event handler. Via closure this global ‘resize’ event handler prevents not just the entire dialog from garbage collection, but also part of my application that is tied to the dialog. With each time I create the dialog the number of global resize event handler increases by 1. With the help of a debugger you can see that the handlers refer to jQWidgets source code.
Here you can find a jsfiddle that reproduces the problem:
http://jsfiddle.net/eG6PT/4/
With each button click a leaking global resize event handler gets added. I was hoping that because of “closeButtonAction: ‘close'” the popup dialog gets erased completely when closed.
So I am assuming that I am doing something wrong, which in turn causes my dialog to leak memory, but I can not find out what this is. Could you please help ?
NOTE: I saw that some of your examples use a single global dialog that they just hide/show, but for my application that would not be a good option. Instead I’d like to create/destroy dialogs as needed.
Regards,
Stephan