Skip to content

Commit 42d33f2

Browse files
Florian Gutmannscottgonzalez
Florian Gutmann
authored andcommitted
Dialog: fix small memory leak when having lot's of instances. Fixes #7793 - Small memory leak in ui dialog.
1 parent 26bcf97 commit 42d33f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ui/jquery.ui.dialog.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -715,12 +715,11 @@ $.extend( $.ui.dialog.overlay, {
715715
$( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
716716
}
717717

718-
var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) )
719-
.appendTo( document.body )
720-
.css({
721-
width: this.width(),
722-
height: this.height()
723-
});
718+
var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) );
719+
$el.appendTo( document.body ).css({
720+
width: this.width(),
721+
height: this.height()
722+
});
724723

725724
if ( $.fn.bgiframe ) {
726725
$el.bgiframe();

0 commit comments

Comments
 (0)