Skip to content
Permalink
Browse files

Clear elements to avoid leaking memory. Close gh-837. Fixes #11809

  • Loading branch information...
gibson042 authored and rwaldron committed Jun 26, 2012
1 parent 7a9b57a commit b6d02735e955523adcf88ff92b3bc7ecb144c624
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/manipulation.js
@@ -341,6 +341,9 @@ jQuery.fn.extend({
}
}

// Fix #11809: Avoid leaking memory
fragment = first = null;

if ( scripts.length ) {
jQuery.each( scripts, function( i, elem ) {
if ( elem.src ) {
@@ -708,7 +711,7 @@ jQuery.extend({
// Fix #11356: Clear elements from safeFragment
if ( div ) {
safe.removeChild( div );
div = safe = null;
elem = div = safe = null;
}

// Reset defaultChecked for any radios and checkboxes

0 comments on commit b6d0273

Please sign in to comment.
You can’t perform that action at this time.