From: Florian Gutmann Date: Fri, 14 Oct 2011 15:12:21 +0000 (+0300) Subject: Dialog: fix small memory leak when having lot's of instances. Fixes #7793 - Small... X-Git-Tag: 1.9m7~190 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=42d33f2f86d48f5f82a640a6c57c566a4e84cdda;p=jquery-ui.git Dialog: fix small memory leak when having lot's of instances. Fixes #7793 - Small memory leak in ui dialog. --- diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 065d640fb..46320426a 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -715,12 +715,11 @@ $.extend( $.ui.dialog.overlay, { $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize ); } - var $el = ( this.oldInstances.pop() || $( "
" ).addClass( "ui-widget-overlay" ) ) - .appendTo( document.body ) - .css({ - width: this.width(), - height: this.height() - }); + var $el = ( this.oldInstances.pop() || $( "
" ).addClass( "ui-widget-overlay" ) ); + $el.appendTo( document.body ).css({ + width: this.width(), + height: this.height() + }); if ( $.fn.bgiframe ) { $el.bgiframe();