Nope I take half of that back. The above works if you keep the same
modal dialog open and keep re-opening it. But for every new dialog I
open I get a 200k hit that is never released. This has nothing to do
with filter:. I destroy everything to do with the dialog

I've come up with a workaround which is to have a pool of divs that
are specifically for dialogs. I have an array of [false, false, false
etc...] to start with which means none of the div are dialogs yet.
When I request a dialog I check if there are any uninitialized divs
and dialog( oConfig) them. If there are no uninitialized divs then I
check each dialog( 'isOpen') == false and use closed dialogs with the
new dialog

If there are no divs left I can either say "Too many windows open" or
dynamically add another to the pool of dialog divs. Seems to work ok
in my preliminary testing but I've yet to test with dynamic data being
added to the dialogs

You get a memory hit for each dialog but at least it is capped to how
many dialog divs I have. So effectively it looks like you need a
dialog manager to work with multiple dialogs in a long-life single-
page app otherwise you get memory leaks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to