Commit b6d02735 authored by Richard Gibson's avatar Richard Gibson Committed by Rick Waldron

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

parent 7a9b57aa
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment