I receive html using ajax, i load the html into a variable and save it for later reuse
- window.view = $(receivedHtml);
I then show it as a dialog
- $(receivedHtml).dialog();
It goes into the DOM as shown bellow

Once i finish with that dialog i destroy it using the html variable
- $(window.view).dialog("destroy");
It's being removed from the DOM but it stays in firebug/firefox outside of the html document, as shown bellow (You can see multiple dialogs there, every time i receive new html and destroy it it will go on top):