Skip to content

Commit

Permalink
Fixed bug #225 again
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Oct 3, 2006
1 parent 004f3dd commit 25ee2d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/event/event.js
Expand Up @@ -155,6 +155,9 @@ jQuery.extend({
// Reset the list of functions // Reset the list of functions
jQuery.readyList = null; jQuery.readyList = null;
} }
// Remove event lisenter to avoid memory leak
if ( jQuery.browser.mozilla || jQuery.browser.opera )
document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
} }
} }
}); });
Expand Down Expand Up @@ -1659,6 +1662,6 @@ if ($.browser.msie) $(window).unload(function() {
var event = jQuery.event, global = event.global; var event = jQuery.event, global = event.global;
for (var type in global) { for (var type in global) {
var els = global[type], i = els.length; var els = global[type], i = els.length;
if (i>0) do event.remove(els[i-1], type); while (--i); if (i>0) do if (type != 'unload') event.remove(els[i-1], type); while (--i);
} }
}); });

0 comments on commit 25ee2d8

Please sign in to comment.