Skip to content

Commit

Permalink
Dialog: fix small memory leak when having lot's of instances. Fixes #…
Browse files Browse the repository at this point in the history
…7793 - Small memory leak in ui dialog.
  • Loading branch information
Florian Gutmann authored and scottgonzalez committed Oct 14, 2011
1 parent 26bcf97 commit 42d33f2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ui/jquery.ui.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,12 +715,11 @@ $.extend( $.ui.dialog.overlay, {
$( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
}

var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) )
.appendTo( document.body )
.css({
width: this.width(),
height: this.height()
});
var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) );
$el.appendTo( document.body ).css({
width: this.width(),
height: this.height()
});

if ( $.fn.bgiframe ) {
$el.bgiframe();
Expand Down

0 comments on commit 42d33f2

Please sign in to comment.