destroying an iframe dialog

destroying an iframe dialog


Hi All,
I'm using this method (url construction details omitted) to load an HTML
page into a dialog and open the dialog:
$('<iframe id="editDirectoryFrame" src="' + myUrl + '" />').dialog({
title:"Edit Directory Listing",
autoOpen:true,
height:500,
width:600,
modal:true,
resizable:false,
overlay: {
opacity: 0.5,
background: "black"
}
});
That works fine. In the dialog I have a form with a button that saves
the form data (via an ajax call) and then reloads the calling page via:
parent.location.href = parent.location.href;
I'm a bit concerned about mem leaks since the dialog is still open at
the time the parent reloads. I'm wondering
a) if I should be concerned
b) if so, how I can "destroy" the dialog (how I can id it), since it's
not explicitly loaded into a DOM node on the calling page.
Thoughts?
Also, if there's a more desirable way to load the content, I'd like to
know. I need to have the content in it's own iframe, because it has to
load an entire HTML page with an embedded form, it's own js files, etc.
Thanks,
Jack